On Fri, 20 Jun 2014 17:33:14 -0400, Dennis New wrote: > On Thu, 19 Jun 2014 17:44:39 -0400 (EDT), Alan Stern wrote: > > On Thu, 19 Jun 2014, Dennis New wrote: > > > > > On Thu, 19 Jun 2014 17:03:55 -0400 (EDT), Alan Stern wrote: > > > > On Tue, 17 Jun 2014, Dennis New wrote: > > > > > > > > > On Thu, 12 Jun 2014 10:20:54 -0400 (EDT), Alan Stern wrote: > > > > > > Dennis and Matteo: > > > > > > > > > > > > I promised to send both of you a patch changing the way > > > > > > ohci-hcd handles hardware bugs. Well, it's finally ready > > > > > > for testing. There's only a limited amount I can do on my > > > > > > own machine, so now it's up to you guys. > > > > > > > > > > > > The patch was made against an early -rc version of 3.15, but > > > > > > it will apply okay to 3.14 and maybe even earlier kernels. > > > > > > > > > > So, it happened again, after a random few days, this time with > > > > > dmesg a bit different: > > > > > > > > > > [210263.872368] ohci-pci 0000:00:13.0: frame counter not > > > > > updating; disabled > > > > > [210263.872377] ohci-pci 0000:00:13.0: HC died; cleaning up > > > > > [210263.872456] usb 2-4: USB disconnect, device number 4 > > > > > [210264.872344] timeout: still 2 active urbs on EP #3 > > > > > > > > > > The frame counter indeed was not updating. I notice that this > > > > > time, it says there are "still 2 active urbs", whereas before > > > > > it always said 3. I also noticed that before I would still get > > > > > "USB disconnect" messages when I unplugged my device, but not > > > > > this time. It looks like there was a more thorough disabling > > > > > of the usb/ohci system this time. > > > > > > > > That "timeout:" message came from the snd-usb-audio driver. I > > > > don't know if the number of URBs is especially significant, > > > > probably not. The lack of "USB disconnect" messages is expected, > > > > because as you realized, the OHCI driver was disabled. > > > > > > > > Anyway, it looks like things are working better than they did > > > > before. Your system isn't crashing when the problem occurs, > > > > right? This might not be the solution you wanted, but I think > > > > it's the best we can do. > > > > > > My system didn't really crash before either -- just the ohci. I > > > forget if the process that was using the snd-usb-audio driver > > > remained hung in the background, but commands like "lsusb" do not > > > work. I am forced to reboot to get ohci-usb working again :\. > > > Isn't there a way to reset the ohci subsystem? :s > > > > And with the patch, lsusb and the sound processes do work after the > > fault? I want to make sure, since you didn't say explicitly. > > > > You can restart the OHCI controller by this sequence of commands: > > > > echo 0000:00:13.0 >/sys/bus/pci/drivers/ohci_pci/unbind > > echo 0000:00:13.0 >/sys/bus/pci/drivers/ohci_pci/bind > > > > However, some USB devices can't recover from this sort of event > > until they have been unplugged. I tried it with two flash drives > > plugged in; afterwards one of them worked and the other didn't. > > With the new patch, mplayer is able to close gracefully, with pcm > errors like "No such device". This time, my dmesg was slightly > different, with an "HcDoneHead" message: > > [139650.866080] ohci-pci 0000:00:13.0: HcDoneHead not written back; > disabled > [139650.866089] ohci-pci 0000:00:13.0: HC died; cleaning up > [139650.866166] usb 2-4: USB disconnect, device number 3 > [139651.866074] timeout: still 2 active urbs on EP #3 > > However, lsusb does not work, and I cannot kill it -- it remains in D > (uninterruptible sleep) state. I am also unable to rmmod the > snd_usb_audio module -- rmmod gets stuck in D state too. > > When I tried echoing (0000:00:13.0) to ohci_pci/unbind, although dmesg > says: > > [140078.654462] ohci-pci 0000:00:13.0: remove, state 1 > [140078.654480] usb usb2: USB disconnect, device number 1 > > ... the echo command (a bash internal) does not terminate, and also > gets stuck in D state. > > Although the symlink to 0000:00:13.0 does get removed from that > directory. But trying to echo this back to ohci_pci/bind doesn't work: > > "write error: No such device" > > Even though 0000:00:13.0 is still listed > in /sys/kernel/debug/usb/ohci. > > Try to "cat" /sys/kernel/debug/usb/devices also fails, and cat gets > stuck in D state too. > > My usb thumbdrive also no longer works after this occurs, although I'm > pretty sure it uses EHCI. I'm forced to reboot to get usb working > again :s. cat'ing the stuff in /sys/kernel/debug/usb/ohci/0000:00:13:0/ in the hung state: ==> async <== ==> periodic <== size = 32 0 [ 22]: ed1/ffff880021853000 (fs dev3 ep1in-int qlen 1 max 16 00101083) 1 [ 22]: ed1/ffff880021853000 2 [ 22]: ed1/ffff880021853000 3 [ 22]: ed1/ffff880021853000 4 [ 22]: ed1/ffff880021853000 5 [ 22]: ed1/ffff880021853000 6 [ 22]: ed1/ffff880021853000 7 [ 22]: ed1/ffff880021853000 8 [ 22]: ed1/ffff880021853000 9 [ 22]: ed1/ffff880021853000 10 [ 22]: ed1/ffff880021853000 11 [ 22]: ed1/ffff880021853000 12 [ 22]: ed1/ffff880021853000 13 [ 22]: ed1/ffff880021853000 14 [ 22]: ed1/ffff880021853000 15 [ 22]: ed1/ffff880021853000 16 [ 22]: ed1/ffff880021853000 17 [ 22]: ed1/ffff880021853000 18 [ 22]: ed1/ffff880021853000 19 [ 22]: ed1/ffff880021853000 20 [ 22]: ed1/ffff880021853000 21 [ 22]: ed1/ffff880021853000 22 [ 22]: ed1/ffff880021853000 23 [ 22]: ed1/ffff880021853000 24 [ 22]: ed1/ffff880021853000 25 [ 22]: ed1/ffff880021853000 26 [ 22]: ed1/ffff880021853000 27 [ 22]: ed1/ffff880021853000 28 [ 22]: ed1/ffff880021853000 29 [ 22]: ed1/ffff880021853000 30 [ 22]: ed1/ffff880021853000 31 [ 22]: ed1/ffff880021853000 ==> registers <== bus pci, device 0000:00:13.0 OHCI PCI host controller ohci_hcd OHCI 1.0, NO legacy support registers, rh state halted control 0x2c0 RWC HCFS=suspend CBSR=0 cmdstatus 0x00000 SOC=0 intrstatus 0x00000000 intrenable 0x00000004 SF hcca frame 0xb58e fmintvl 0x27782edf FSMPS=0x2778 FI=0x2edf fmremaining 0x00000000 FR=0x0000 periodicstart 0x0000 lsthresh 0x0628 hub poll timer off roothub.a 02000204 POTPGT=2 NPS NDP=4(4) roothub.b 00000000 PPCM=0000 DR=0000 roothub.status 00008000 DRWE roothub.portstatus [0] 0x00000100 PPS roothub.portstatus [1] 0x00000100 PPS roothub.portstatus [2] 0x00000100 PPS roothub.portstatus [3] 0x00000103 PPS PES CCS -- 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