Hi all, Recently, I have several customers troubled in safe recover USB function during the ESD situation (or some other situations, like short dp/dm, ground dp/dm, etc). I designed the ESD detect and recovery process, but I met some sync problems between host controller driver (eg, ehci) and class driver (eg, mass storage). For example, when khubd tries to disconnect usb device, it will try to stop thread usb-storage, but usb-storage is waiting some transfers to finish, qTD and QH operation may be finished (usb_submit_urb does not return error), but no watchdog timer and completion interrupt are occurred. I have: esd_detect_process and esd_recovery_process at host controller driver. At esd_detect_porcess It will disable usb interrupt and judge ASE and PSE, etc. At esd_recovery_process: It needs to reset controller (usbcmd.rst, and toggle portsc.pp bit, etc) I would like to have some synchronization mechanism between usb_submit_urb or (ehci_urb_enqueue) and my esd_detect_process and esd_recovery_process. But still not find a safe one, eg, I still met khubd's status changes "D" problem described above. Any suggestions are appreciated, Thanks. -- Best Regards, Peter Chen -- 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