On Fri, 17 Dec 2004, Wakko Warner wrote:

> Alan Stern wrote:
> > Amusingly enough, the change in behavior was caused not by adding code but 
> > by removing it.  The usb-storage driver in 2.4 went to some trouble to try 
> > and maintain the ficticious existences of devices after they had been 
> > unplugged.  In 2.6 all that was removed, and so now when you unplug a 
> > device it just goes away, period.
> 
> I'd love to do this with my 2.4 boxen.  Any pointers on what to remove?

On Fri, 17 Dec 2004, Matthew Dharm wrote:

> Actually, the 2.4 SCSI core doesn't support hot-unplug very well.  So it's
> more difficult than just changing usb-storage.

That may be.  But usb-storage seems to manage okay during rmmod, so maybe 
it won't be so bad.

Wakko, what you need to change is all in the drivers/usb/storage/usb.c 
source file.

        In the storage_probe() routine, remove all the code that deals
        with devices that have been seen before.  This means getting
        rid of most of the stuff following the "Now check if we have 
        seen this GUID before" and "Existing device -- re-connect" 
        comments.

        At the end of the storage_disconnect() routine put the code
        that now sits in usb_stor_exit(), the stuff that does the
        scsi_unregister_module call, the extra_destructor call, and
        the kfree calls.  Make sure you do it only for the device
        being disconnected, not for every device on the us_list!

        If you want, you can get rid of us_list because it won't be
        used for anything any more.

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to