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

Greg KH
2003-01-16T19:53:06Z

On Thu, Jan 16, 2003 at 11:43:23AM -0800, Matthew Dharm wrote:
> Well, we only create the host when the device is first attached. After
> that, if it goes away and comes back, we re-connect it to the old SCSI
> host.

Ick, so when the device is gone, where does the SCSI host go? Is it
still represented in sysfs and in the SCSI core properly?

> But, while the device is gone, you've created an association between a SCSI
> node that exists and a non-existant USB device. Basically, you've got a
> pointer that is no longer valid. And when the device is re-attached, there
> isn't code to re-establish the correct SCSI<->USB association.

Why not? I'm guessing that you re-establish this association, right?
Then you might have to add this same call to whereever that is done.

> Something like this would proabably make sense if the hot-unplugging code
> for SCSI hosts was really stable -- then we could unregister the host when
> the device went away, and this relation would be disconnected
> automatically.

Well, push back on the SCSI people to fix this then, hot-unplug should
work properly on the SCSI layer too :)

thanks,

greg k-h