Re: xHCI problem? [was Re: Erratic USB device behavior and device loss]

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Thank you Alan for confirming the bug.

On Mon, 2016-08-22 at 15:09 -0400, Alan Stern wrote:
> > https://people.debian.org/~rrs/tmp/usb_1u-usbmon.txt.gz
>
> > https://people.debian.org/~rrs/tmp/dmesg-usbmon.txt
> 
> The usbmon trace shows two separate issues, one in software and one in 
> hardware.  The two issues may or may not be related.
> 
> The software bug is in the driver for this device.  Every 3 seconds it 
> does a runtime suspend followed immediately by a resume, for no 
> apparent reason.  Even worse, it tries to communicate with the device 
> during the time that it is suspended!
> 
> The hardware bug is a series of spontaneous disconnections.  Again, 
> there's no obvious reason for this, although it's possible that the 
> device doesn't like going into and out of suspend very often.  (But 
> there are a lot more suspends than disconnects.)  It's also possible 
> that the USB cable isn't making a firm connection.
> 
> The final blow came when the driver tried to communicate with the
> device _as_ it was being suspended.  That seemed to mess up the
> hardware so badly that it was unable to recover, and from that point it
> stopped working entirely.
> 
> The timing may explain why it takes so long for the device to stop 
> working.  That doesn't happen until, by chance, the driver tries to 
> communicate with the device as it is being suspended.
> 
> Try doing this: Reboot.  Then before the problem occurs, mount a 
> debugfs filesystem on /sys/kernel/debug and make a copy of 
> /sys/kernel/debug/usb/devices.  Let's see what it says about the faulty 
> card reader.

Upon resume today morning, surprisingly, I get the lsusb output reporting the
device. Earlier, it used to knockoff the device from the list.

rrs@learner:/var/tmp$ lsusb 
Bus 003 Device 002: ID 8087:8000 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 048d:8350 Integrated Technology Express, Inc. 
Bus 001 Device 005: ID 0bda:b728 Realtek Semiconductor Corp. 
Bus 001 Device 004: ID 04f2:b40f Chicony Electronics Co., Ltd 
Bus 001 Device 003: ID 04f3:0303 Elan Microelectronics Corp. 
Bus 001 Device 013: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader
Controller
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
2016-08-23 / 14:08:05 ♒♒♒  ☺  

And dmesg reported it detected and then, like you've analyzed so far,
disconnected.

[ 1904.885366] usb 1-4: USB disconnect, device number 50
[ 1906.123534] usb 1-4: new high-speed USB device number 51 using xhci_hcd
[ 1912.870405] usb 1-4: new high-speed USB device number 57 using xhci_hcd
[ 1920.370643] usb 1-4: new high-speed USB device number 66 using xhci_hcd
[ 1987.822768] usb 1-4: new high-speed USB device number 71 using xhci_hcd
[ 1994.799738] usb 1-4: new high-speed USB device number 78 using xhci_hcd
[ 2002.373323] usb 1-4: new high-speed USB device number 88 using xhci_hcd
[ 2002.547056] usb 1-4: New USB device found, idVendor=0bda, idProduct=0129
[ 2002.547059] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2002.547061] usb 1-4: Product: USB2.0-CRW
[ 2002.547062] usb 1-4: Manufacturer: Generic
[ 2002.547064] usb 1-4: SerialNumber: 20100201396000000
[ 2005.804225] usb 1-4: reset high-speed USB device number 88 using xhci_hcd
[ 3052.573655] usb 1-4: USB disconnect, device number 88
[ 3053.854647] usb 1-4: new high-speed USB device number 89 using xhci_hcd
[ 3054.028343] usb 1-4: New USB device found, idVendor=0bda, idProduct=0129
[ 3054.028347] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3054.028349] usb 1-4: Product: USB2.0-CRW
[ 3054.028351] usb 1-4: Manufacturer: Generic
[ 3054.028352] usb 1-4: SerialNumber: 20100201396000000
[ 6376.220631] usb 1-4: USB disconnect, device number 89
[ 6377.469613] usb 1-4: new high-speed USB device number 90 using xhci_hcd
[ 6377.643178] usb 1-4: New USB device found, idVendor=0bda, idProduct=0129
[ 6377.643182] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6377.643184] usb 1-4: Product: USB2.0-CRW
[ 6377.643186] usb 1-4: Manufacturer: Generic
[ 6377.643188] usb 1-4: SerialNumber: 20100201396000000
[ 7166.914656] usb 1-4: reset high-speed USB device number 90 using xhci_hcd
[ 7167.074275] usb 1-4: Device not responding to setup address.
[ 7167.277738] usb 1-4: Device not responding to setup address.
[ 7167.480937] usb 1-4: device not accepting address 90, error -71
[ 7167.641011] usb 1-4: reset high-speed USB device number 90 using xhci_hcd


Trying to read the /sys/kernel/debug/usb/devices led to a hung process. The
process is in uninterruptible sleep. I'm seeing this for the very first time for
a USB (Non Storage) device. Perhaps it has to do with the frequent resets.

rrs@learner:/var/tmp$ ps aux | grep "cat devices"
root     18453  0.0  0.0   6004   772 pts/0    D+   13:56   0:00 cat devices
rrs      20487  0.0  0.0  12788   972 pts/1    S+   14:09   0:00 grep --
color=auto cat devices
2016-08-23 / 14:09:47 ♒♒♒  ☺  



I've gotten some kernel oopses show up for the very first time, for this bug.
The oops is showing trace of the usb device. And it looks like it got hung in
device removal.

dmesg output with oops available at link below.
https://people.debian.org/~rrs/tmp/usb-kernel-oops.txt

In one of yesterday's email, I have shared the output of
/sys/kernel/debug/usb/devices before the bug is triggered. The same I've pasted
below.

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=0129 Rev=39.60
S:  Manufacturer=Generic
S:  Product=USB2.0-CRW
S:  SerialNumber=20100201396000000
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=50 Driver=rtsx_usb
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   3 Ivl=64ms


I'll pick the same again when I reboot.

- -- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXvA6PAAoJEKY6WKPy4XVpGRMP+gN78ENaC4VwZdqVq+STqQ73
ys0DSSd4JPVaN7FeXIGFbd3/rIn/lRFk2ETuI9CPAZpB/UdLd/cmYv7W3wSxl5Ia
7NswahFU28NQGkibXRj5IouwZ4ulh1Kba1L9xWtU3E/KSCNIOPGKb389q2/icmcr
//bn1qzZPtVNwI90eKA9WGd5miHuFB7n4rZrnw34unsjhtPfn2od7MwPdm+qaone
Bkkb33LZrRA7lR5ctd/8n2794NJC2L6O9EIyjkCeBeVBqqgUGEXeUxeVoj8pE4Wz
tACnyQ9S7FUKg8sQiH3LAbS9C8pE9mmwd8kirumu6XnZNPsUE7L+OeWE07qjec5k
VoTMWEhFwxyJU7l26JJhUHjSQbe3NH4fly+PPgmtdsLEkZSrsfuMtFRTJyCVvPQe
aF5v7a+fyGPkK6sVKcayLOgX1ret/451sqbpHGzKgLDJHnK2AdCxHV8VnGormkz8
Bm5+WnopYB0NVI1Oad2F4JkK79fH29nKUiQmBzcE2AzrOp6s9714O005qbQc4RqY
WSxUQVTsGXn+LIUaUT+l/bOH1acnn3yX0yo5mnw/ZVPNsO4G90oqY45eDiVf3R5b
hBEZg9YlI/82rPUp2EvzfTvp52ubP24IbjfJlYI/1+/HCbar90S06QlfO4jSdc22
obT0V9Zuwoh4mCpkSOGG
=WK+G
-----END PGP SIGNATURE-----

--
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