On Mon, 8 Dec 2003, Duncan Sands wrote:

> Hi Alan, this is for usbfs, not a normal driver.  Recall that I want to replace
> use of ps->devsem with ps->dev->serialize.

Maybe you shouldn't do that.  Other drivers maintain their own data 
structure separately from the struct usb_device and with its own lock.  
But usbfs may suffer from complications as a result of its unorthodox 
approach to device ownership.

>  Currently ps->dev is set to NULL in
> the devio.c usbfs disconnect method (if some interface is claimed) or in
> inode.c on device disconnect, making it hard to lock with ps->dev->serialize :)
> Thus disconnect should no longer be signalled by setting ps->dev to NULL.

If you would keep the ps->devsem lock, would there be any problem in 
setting ps->dev to NULL to indicate disconnection?

Are they any reasons for not keeping ps->devsem?  Since usbfs generally 
acts as a driver and drivers generally don't have to concern themselves 
with usbdev->serialize (the core handles it for them), shouldn't usbfs 
also be able to ignore ps->dev->serialize?

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