On Wed, 23 Mar 2016, yoma sophian wrote: > hi Alan: > 2016-03-04 23:25 GMT+08:00 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>: > > On Fri, 4 Mar 2016, yoma sophian wrote: > > > >> BTW, when I disable BH support in hcd driver. > >> I get below recursion of spin lock sometimes. > >> Did I missing anything once disable BH? > > > > Yes, you missed a very important fact: ehci-hcd _requires_ BH support! > if so, why we still keep below part of code that will never run under > BH enabled. > > if (!hcd_giveback_urb_in_bh(hcd) && !is_root_hub(urb->dev)) { > __usb_hcd_giveback_urb(urb); > return; > } Where is that code? Not anywhere in ehci-*.c. Are you talking about drivers/usb/core/hcd.c? That file interacts with other drivers besides ehci-hcd, and many of those other drivers do not have BH support. However, it's true that ehci-hcd does contain some code that will never get used with BH givebacks enabled. I haven't tried to remove this code because it doesn't create any problems (although perhaps I should). 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