diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-08-16 16:16:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-08-22 14:27:52 -0700 |
commit | 2f67cd5b1d5066d11761aebb0bf4b76bc253cc99 (patch) | |
tree | 937b0f53c025ea429d0814c6200322b3460487a7 /drivers/usb/storage/transport.h | |
parent | fa0de2b614ca89d14d046e6756ba020fd386ff71 (diff) |
usb-storage: fix bugs in the disconnect pathway
This patch (as961) fixes a couple of bugs in the disconnect pathway of
usb-storage.
The first problem, which apparently has been around for a while
although nobody noticed it, shows up when an aborted command is still
pending when a disconnect occurs. The SCSI error-handler will
continue to wait in command_abort() until the us->notify completion is
signalled. Thus quiesce_and_remove_host() needs to signal it.
The second problem was introduced recently along with autosuspend
support. Since usb_stor_scan_thread() now calls
usb_autopm_put_interface() before exiting, we can't simply leave the
scanning thread running after a disconnect; we must wait until the
thread exits. This is solved by adding a new struct completion to the
private data structure. Fortuitously, it allows the removal of the
rather clunky mechanism used in the past to insure that all threads
have finished before the module is unloaded.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/transport.h')
0 files changed, 0 insertions, 0 deletions