RE: [PATCH v2] usb: xhci: Link TRB must not occur within a USB payload burst

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Sarah Sharp [mailto:sarah.a.sharp@xxxxxxxxxxxxxxx]
> 
> On Mon, Nov 11, 2013 at 12:26:54PM -0000, David Laight wrote:
> >
> > Section 4.11.7.1 of rev 1.0 of the xhci specification states that a link TRB
> > can only occur at a boundary between underlying USB frames (512 bytes for 480M).
> >
> > If this isn't done the USB frames aren't formatted correctly and, for example,
> > the USB3 ethernet ax88179_178a card will stop sending (while still receiving)
> > when running a netperf tcp transmit test with (say) and 8k buffer.
> 
> Can you send the exact command line you used to cause the stall?  I'd
> like to reproduce this with my USB 3.0 ethernet adapter.

Make sure you are running 3.12.0 or later. The usbnet code to support
segmentation isn't in anything much earlier and the as88179_178a
driver needs to have TSO enabled.

I'm using netperf 2.6 (compiled from source) running the netserver on
the system with the USB ethernet. The ethernet is directly connected to
an e1000 PCIe card on the other system (in a random subnet).
The control connection is using the main LAN.

I'm running netperf from a script that can loop through various parameters.
The TCP receive test should be from:

control="main LAN address of remote system"
target="USB3 address of remote system"
output=REQUEST_SIZE,PROTOCOL,ELAPSED_TIME,TRANSACTION_RATE,LOCAL_SEND_THROUGHPUT,LOCAL_RECV_THROUGHPUT,REMOTE_RECV_THROUGHPUT,THROUGHPUT_UNITS
netperf -l 60 -f B -D5 -t omni -H $control -- \
                        -T tcp -H $target -D -d in -r 8192 -O $output

I'd added some diagnostic prints to every TRB setup so I could see the fragment
sizes, ring slot addresses and the flags.
You should see URB for almost 64k split into 3 or 4 parts.
When it stopped it was always just after a LINK TRB that had been mid-TD.
The USB packets are still processed, but the TCP packets don't get transmitted.

If you have a USB3 analyser I think you'll see an unexpected short packet
if you split a data TRB across the link TRB on a non-1k boundary.

I then wrote the patch to see if it would make a difference - it did.

	David



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux