• Matthew Dharm's avatar
    [PATCH] usb-storage: move to SCSI hotplugging · 82469dfd
    Matthew Dharm authored
    The attached patch is my first implementation of SCSI hotplugging.
    
    It's only been tested that it compiles, as I can't get the current
    linux-2.5 tree from linuxusb to boot.  It dies _very_ early.  Greg, I'm not
    sure if you'll want to apply this.  Linus seemed to want this very much,
    and it is 2.5.x... I say go for it, but I can understand if you have
    reservations.
    
    I would definately like to see this tested by anyone who can get a kernel
    to boot.
    
    This patch is quite large.  Lots of things had to be changed.  Among them:
    
    (o) The proc interface now uses the host number to look up the SCSI host
        structure, and then finds the usb-storage structure from that.
    (o) The SCSI interface has been changed.  The code flow is now much
        clearer, as more work is done from the USB probe/detach functions than
        from auxillary functions.
    (o) Names have been changed for newer conventions
    (o) GUIDs have been removed
    (o) The linked-list of devices has been removed, and it's associated
        semaphore
    (o) All code dealing with re-attaching a device to it's old association has
        been removed
    (o) Some spaces changed to tabs
    (o) usb-storage now takes one directory under /proc/scsi instead of
        one per virtual-HBA
    (o) All control threads now have the same name.  This could be changed back
        to the old behavior, if enough people want it.
    
    Known problems:
    (o) Testing, testing, testing
    (o) More dead code needs to be cut
    (o) It's a unclear how a LLD is supposed to cut off the flow of
        commands, so that the unregister() call always succeeds.  SCSI folks
        need to work on this.
    (o) Probing needs to be broken down into smaller functions, probably.
    82469dfd
scsiglue.c 23.9 KB