On Sat, 4 Jun 2016, Greg KH wrote: > On Sat, Jun 04, 2016 at 10:05:27AM +0200, Michał Pecio wrote: > > > Hi, I think I have a bug in the OHCI driver. > > > > > > Kernel version: 4.4.11 (some old 3.14 seems fine, didn't try others) > > > > 3.18.34 and 4.7-rc1 are affected too. > > > > The bug seems to have been introduced by "add I/O watchdog for orphan > > TDs" (81e38333). I couldn't run bisect because those old kernels don't > > build with gcc5+, but I started reverting commits to ohci-hcd.c and > > ohci-q.hcd on top of 3.18.34 and got things to work at this point: > > > > commit 0831cb21003464f0764581fed26de83ac097d799 > > Author: Michal Pecio <michal.pecio@xxxxxxxxx> > > Date: Sat Jun 4 09:55:25 2016 +0200 > > > > Revert "USB: OHCI: add I/O watchdog for orphan TDs" > > > > This reverts commit 81e38333513cec155c720432226dabe9f9f76a77. > > > > commit cce8b2ec8e97a7c01fda1275e2a5732a1d0a1d88 > > Author: Michal Pecio <michal.pecio@xxxxxxxxx> > > Date: Sat Jun 4 09:53:58 2016 +0200 > > > > Revert "USB: OHCI: add check for stopped frame counter" > > > > This reverts commit 499b3803d3e2f062f73bf22372b38393369ffcbf. > > Alan, any ideas here? > > Michał, please always cc: the people who wrote the patches that you > found problems with, makes things much easier :) I haven't taken the time to go through it in detail yet. It looks like the driver is trying to remove an ED from the in_use_list before it was added to the list, which doesn't make sense. Michał, you could add some debugging lines to the source code that might help pin down the problem. ed->in_use_list gets modified in only two places: in ohci_urb_enqueue() in ohci-hcd.c and in finish_unlinks() in ohci-q.c. Just before each of those lines, you could write out the value of ed to the kernel log. That would tell us if the ED really is being removed before it is added to the list. Alan Stern -- 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