Re: [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58

Alan
2003-01-21T03:31:54Z

On Mon, 2003-01-20 at 18:23, Oliver Neukum wrote:
> > The transport can notify that the device is gone, but an ULP entity will
> > call scsi_remove_device() not the other way around.
>
> NO!
>
> This is an insanely complicated scheme.
> We have no notification beforehand. User yanks out cable.
> That's it. No preperation at all.
>
> We as the writers of device drivers need a way to get rid of the device
> as we are notified of the physical disconnect. It is not our job to maintain
> devices in an undead state.

If you think about it rationally there isnt a lot that can be done higher
up. At the point the hardware vanishes there may be other threads of execution
already in your driver, so undead state is a reality you have to live with, at
least briefly.

Providing you refcount objects and defer freeing of resources its not normally
too terrible