Here's another question to add to your discussion.

When a device is unplugged, the system's representation of that device
can't be removed immediately; there may be open fd's, mounts, pointers,
and so on.  Until the time comes when all these handles are released, all
interaction with the device has to fail, one way or another.

Whose responsibility is it to fail these interactions?

For something simple, like a USB serial port, it might turn out that the 
low-level device driver gets all these requests and then fails them.  That 
means the driver has to keep track of the fact that the device is no 
longer connected until some reference count goes to 0.

For SCSI and emulated SCSI devices, it might be the one of the SCSI layers 
that keeps track of the fact that the device has disconnected.  Or it 
might be somewhere else in the kernel.

It would nice to have some sort of coherent plan for how to handle this.  
In fact, it ought to be part of the device-driver model that underlies 
sysfs.  But so far as I am aware, there is currently nothing in the sysfs 
documentation to address the problem.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to