android_kernel_motorola_sm6225/drivers/usb/storage
Alan Stern 543f7810fb usb-storage: implement "soft" unbinding
This patch (as1092) implements "soft" unbinding for usb-storage.  When
the disconnect routine is called, all commands and reset delays are
allowed to complete normally until after scsi_remove_host() returns.
This means that the commands needed for an orderly shutdown will be
sent through to the device.

Unlike before, the driver will now execute every command that it
accepts.  Hence there's no need for special code to catch unexecuted
commands and fail them.

The new sequence of events when disconnect runs goes as follows:

	If the device is truly unplugged, set the DISCONNECTING
	flag so we won't try to access it any more.

	If the SCSI-scanning thread hasn't started up yet, prevent
	it from doing anything by setting the new DONT_SCAN flag.
	Then wake it up and wait for it to terminate.

	Remove the SCSI host.  This unbinds the upper-level drivers,
	doing an orderly shutdown.  Commands sent to quiesce the
	device will be transmitted normally, unless the device is
	unplugged.

	Set the DISCONNECTING flag so that we won't accept any new
	commands that might get submitted (there aren't supposed to be
	any) and we won't try to access the device for resets.

	Tell the control thread to exit by waking it up with no
	pending command, and wait for it to terminate.

	Go on to do all the other normal stuff: releasing resources,
	freeing memory, and so on.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:54 -07:00
..
alauda.c USB storage: sg chaining support 2007-10-16 11:20:59 +02:00
alauda.h [PATCH] USB Storage: add alauda support 2006-01-04 13:51:42 -08:00
cypress_atacb.c [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer 2008-05-02 10:18:22 -05:00
cypress_atacb.h USB: mass storage: emulation of sat scsi_pass_thru with ATACB 2008-04-24 21:16:42 -07:00
datafab.c USB storage: sg chaining support 2007-10-16 11:20:59 +02:00
datafab.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
debug.c [PATCH] USB: usb-storage: add debug entry for REPORT LUNS 2006-01-04 13:51:42 -08:00
debug.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
dpcm.c USB: drivers/usb/storage/dpcm.c whitespace cleanup 2007-07-19 17:46:08 -07:00
dpcm.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
freecom.c [SCSI] usb: freecom & sddr09 - convert to accessors and !use_sg cleanup 2008-01-11 18:22:36 -06:00
freecom.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
initializers.c USB: usb/storage/initializers.c: fix signedness difference 2008-02-01 14:34:57 -08:00
initializers.h USB: usb-storage: Initialize Huawei E220 properly 2007-10-12 14:55:24 -07:00
isd200.c usb-storage: separate dynamic flags from fixed flags 2008-07-21 15:15:53 -07:00
isd200.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jumpshot.c USB storage: sg chaining support 2007-10-16 11:20:59 +02:00
jumpshot.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
karma.c USB Storage: add rio karma eject support 2006-09-27 11:58:54 -07:00
karma.h USB Storage: add rio karma eject support 2006-09-27 11:58:54 -07:00
Kconfig usb-storage: fix build failure in OneTouch driver 2008-05-02 10:25:51 -07:00
libusual.c usb: libusual kthread_run() called with wrong format. 2008-05-02 10:25:51 -07:00
Makefile USB: mass storage: emulation of sat scsi_pass_thru with ATACB 2008-04-24 21:16:42 -07:00
onetouch.c USB: storage/onetouch.c: make a function static 2008-05-02 10:25:51 -07:00
onetouch.h [PATCH] USB Storage: add support for Maxtor One-Touch button 2005-09-08 16:22:55 -07:00
protocol.c usb-storage: update earlier scatter-gather bug fix 2008-03-04 14:57:43 -08:00
protocol.h USB storage: sg chaining support 2007-10-16 11:20:59 +02:00
scsiglue.c usb-storage: change remaining semaphore to completion 2008-07-21 15:15:53 -07:00
scsiglue.h [PATCH] USB Storage: port reset on transport error 2005-06-27 14:44:03 -07:00
sddr09.c [SCSI] usb: freecom & sddr09 - convert to accessors and !use_sg cleanup 2008-01-11 18:22:36 -06:00
sddr09.h [PATCH] USB Storage: cleanups of sddr09 2006-01-04 13:51:41 -08:00
sddr55.c USB: drivers/usb/storage/sddr55.c: fix uninitialized var warnings 2008-03-10 16:42:25 -07:00
sddr55.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
shuttle_usbat.c [SCSI] usb: shuttle_usbat - convert to accessors and !use_sg code path removal 2008-01-11 18:22:37 -06:00
shuttle_usbat.h [PATCH] USB: shuttle_usbat: Hardcode detection of HP CDRW devices 2006-06-21 15:04:10 -07:00
transport.c usb-storage: implement "soft" unbinding 2008-07-21 15:15:54 -07:00
transport.h [SCSI] usb: transport - convert to accessors and !use_sg code path removal 2008-01-11 18:22:38 -06:00
unusual_devs.h USB: storage: UNUSUAL_DEVS() for PanDigital Picture frame. 2008-07-21 15:15:46 -07:00
usb.c usb-storage: implement "soft" unbinding 2008-07-21 15:15:54 -07:00
usb.h usb-storage: implement "soft" unbinding 2008-07-21 15:15:54 -07:00