summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-dbg.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-08-17 00:16:00 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-08-23 01:27:52 +0400
commit2f67cd5b1d5066d11761aebb0bf4b76bc253cc99 (patch)
tree937b0f53c025ea429d0814c6200322b3460487a7 /drivers/usb/host/ohci-dbg.c
parentfa0de2b614ca89d14d046e6756ba020fd386ff71 (diff)
downloadlinux-2f67cd5b1d5066d11761aebb0bf4b76bc253cc99.tar.xz
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/host/ohci-dbg.c')
0 files changed, 0 insertions, 0 deletions