android_kernel_xiaomi_sm7250/drivers/usb/storage
Alan Stern 2f67cd5b1d 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>
2007-08-22 14:27:52 -07:00
..
alauda.c
alauda.h
datafab.c
datafab.h
debug.c
debug.h
dpcm.c USB: drivers/usb/storage/dpcm.c whitespace cleanup 2007-07-19 17:46:08 -07:00
dpcm.h
freecom.c
freecom.h
initializers.c
initializers.h
isd200.c
isd200.h
jumpshot.c
jumpshot.h
karma.c
karma.h
Kconfig
libusual.c libusual: change block scope variable to function scope 2007-04-27 13:28:34 -07:00
Makefile
onetouch.c USB: storage: onetouch: clean up urb->status usage 2007-07-19 17:46:06 -07:00
onetouch.h
protocol.c
protocol.h
scsiglue.c usb-storage: implement autosuspend 2007-07-12 16:34:43 -07:00
scsiglue.h
sddr09.c
sddr09.h
sddr55.c
sddr55.h
shuttle_usbat.c
shuttle_usbat.h
transport.c
transport.h
unusual_devs.h USB: NIKON D50 is an unusual device 2007-07-30 13:27:46 -07:00
usb.c usb-storage: fix bugs in the disconnect pathway 2007-08-22 14:27:52 -07:00
usb.h usb-storage: fix bugs in the disconnect pathway 2007-08-22 14:27:52 -07:00