[EMAIL PROTECTED] said:
> Providing you refcount objects and defer freeing of resources its not
> normally too terrible  

We already have a struct device, which is a ref counted object precisely for 
this purpose, embedded inside Scsi_Device.

One of the issues doing this is fast reattachment: the device goes away then 
comes back before we've cleared the outstanding command queue.

In the latter case, I think we could use some of the work Luben Tuikov has 
been doing to make the cmnd structures tie more closely to the device:  as 
long as we remove the device from user visibility as soon as it is removed, we 
can keep the Scsi_Device object around until the ref count falls to zero, and 
even create a new one while this is going on.  Commands attached to the old 
device still error out.

It would still be nice if the trigger for Scsi_device removal came from a USB 
hotplug event at user level, but I'm not too bothered about that.

James




-------------------------------------------------------
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