Module Name: src Committed By: riastradh Date: Wed Mar 9 22:17:41 UTC 2022
Modified Files: src/sys/arch/mips/adm5120/dev: ahci.c src/sys/dev/ic: sl811hs.c src/sys/dev/usb: ehci.c motg.c ohci.c uhci.c usbdivar.h usbroothub.c xhci.c Log Message: usb: Provisionally release bus lock around ubm_rhctrl. This isn't quite correct, but it avoids a deadlock: - *_roothub_ctrl holds bus lock, waits in usb_delay_ms for kpause - softint waits for bus lock, holds up kpause wakeup The deadlock is new since recent changes to hold the bus lock over upm_start/upm_transfer. Making this change regresses to other problems: - *_suspend/resume and *_roothub_ctrl often touch the same portsc registers - roothub_ctrl_abort needs to wait for ubm_rhctrl to complete. When the bus lock was held across both, a noop served here, but we can't hold the bus lock across both, so that doesn't work. However, these problems -- which we've had for a long time -- seem to be less bad than the deadlock. So let's avoid the deadlock for now and then work out another way to serialize suspend/resume/rhctrl and aborts. Candidate fix for PR kern/56739. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/adm5120/dev/ahci.c cvs rdiff -u -r1.110 -r1.111 src/sys/dev/ic/sl811hs.c cvs rdiff -u -r1.305 -r1.306 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/usb/motg.c cvs rdiff -u -r1.321 -r1.322 src/sys/dev/usb/ohci.c cvs rdiff -u -r1.311 -r1.312 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.134 -r1.135 src/sys/dev/usb/usbdivar.h cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/usbroothub.c cvs rdiff -u -r1.158 -r1.159 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.