This is a little bit behind-hand in the thread, but bear with me...

On Tue, 9 Dec 2003, Herbert Xu wrote:

> The problem here is the khubd is stuck in usb_set_address() waiting
> for the URB to complete, but it never finishes because the UHCI driver
> isn't getting any interrupts.
> 
> Unloading UHCI gets stuck because usb_disconnect() is called before
> uhci_stop() and usb_disconnect() can't finish because khubd is holding
> its semaphore.

Ouch.  That's a rather bad deadlock.

I still think the proper approach is to fix suspend/resume.  Detecting 
malfunctioning interrupts during HC startup won't help because resume is 
different from startup.  Just detecting them during resume won't help 
either, because pre-existing URBs will still be linked.

However...

If you remain set on fixing this problem for UHCI, the proper approach
would be to install a watchdog timer in the uhci_hcd_cleanup routine.  If
after calling pci_unregister_driver an entire second goes by with no
interrupts received (and pci_unregister_driver hasn't returned), go
through the procedure of calling uhci_free_pending_qhs etc.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to