On Tue, 18 Jan 2005, Matthias Urlichs wrote:

> Hi,
> 
> Alan Stern:
> > It's trying to read /proc/bus/usb/devices, and in the process it locks 
> > each device as it reads the information for that device.  Apparently it 
> > has worked its way up to one of the devices on your card, and it holds the 
> > lock on that device thus blocking usb_disconnect.
> > 
> Lock ordering problem? Naively, I'd assume that reading this file
> shouldn't block.

It's not an ordering problem.  And you're right that normally reading the
file doesn't block -- or more precisely, it doesn't block for long.  
However the kernel does need to transfer the various strings from the
device (the strings aren't cached in the kernel) and that will take up to
a few milliseconds, or in your case, much much longer!

The expected behavior is that the controller driver will return an error
to the code trying to read the strings.  So the read of
/proc/bus/usb/devices will omit those fields but will continue and unlock
the device, at which point disconnect processing can proceed.

Alan Stern



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to