On 10.09.2015 14:54, Alexey Brodkin wrote:
Hello,

I'm seeing a problem when attaching USB device (in my case Ashling
Opella-XD JTAG probe) in Dell e7440 laptop if USB 3.0 is enable in BIOS.

If I disable USB 3.0 in BIOS the same device works perfectly fine.
What's also interesting on my previous laptop (it was HP Elitebook
something) I saw the same device working fine even if plugged in USB 3.0
port (essentially USB 3.0 was enabled in BIOS as well).

And essentially that same device works on the same Laptop in Windows 7.

I run very simple utility that just reads some basic information
from my JTAG probe like serial number, firmware version etc. And I see it
succeeds every second run.

I'm not sure what happens here, have you tried the 4.2 kernel?

If I send additional xhci debugging patches can you apply and test them?

An additional usbmon trace showing which URBs are actually sent could help.

Below is a description on what the log says, mostly just notes
for myself to keep track of this.

Both the succeeding and failing case have the errors:
WARN Event TRB for slot 8 ep 4 with no TDs queued which

Starting point in both cases is probably that there are a few URBs queued,
(seems to be 5 TRB long URBs)

In the successful case, the first URB at xx500 is canceled, we correctly jumps 
to the next one five
TRBs later, at 550: (Successful Set TR Deq Ptr cmd, deq = @3cd8fd550)
Then xhci triggers an event saying a transfer was short, (ID 32) not all data 
was tranferred,
the event is for TRB at 590 ( this would be the last TRB of the five long URB 
starting at 550, makes sense)
xhci driver can't find a TD (URB) queued on the endpoint ring that would 
contain the TRB at 550, this should not happend.
Ring keeps running anyway, and we get these short packet events and life goes 
on.

In the failing case, it seems that ring stops running after canceling the first 
URB (or is never restarted after
ring is stopped to remove TRBs in the canceled URB). Driver probably times out 
5 seconds later as a queued URB never
retuens to the driver, and the diver cancels the URB, This is repeated.

1. the URBs are probably queued to ring as the short packet Event TRB makes 
sense.
   Is the TD missing from our list, or is there some bug in the comparison, or 
is this some additional event and URB
   is already handled, make a patch that dumps both event and transfer rings 
when the event with out TD case is hit.

2. Why does the ring not start in some cases? do we think it's empty, race?

-Mathias




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

Reply via email to