linux-kernel-test/drivers
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
..
accessibility
acpi APCI: revert another duplicated patch 2008-07-20 17:14:57 -07:00
amba
ata
atm
auxdisplay
base
block m68k: Return -ENODEV if no device is found 2008-07-20 17:24:38 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-20 17:43:29 -07:00
cdrom
char Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-21 10:34:25 -07:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio dio: use dio_match_device() in dio_bus_match() 2008-07-20 17:24:40 -07:00
dma
edac
eisa
firewire
firmware
gpio
gpu
hid
hwmon Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
i2c
ide
ieee1394
infiniband
input Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-20 17:43:29 -07:00
leds
lguest
macintosh Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2008-07-21 10:30:10 -07:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb 2008-07-20 21:14:42 -07:00
memstick
message
mfd mfd: let asic3 use mem resource instead of bus_shift 2008-07-20 19:56:44 +02:00
misc
mmc
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-21 11:29:52 -07:00
nubus
of
oprofile
parisc
parport
pci pci kernel-doc fatal error 2008-07-21 10:43:26 -07:00
pcmcia
pnp
power
ps3
rapidio
rtc
s390
sbus
scsi
serial atmel_serial: Fix tty_port breakage 2008-07-20 17:12:37 -07:00
sh
sn
spi
ssb
tc
telephony
thermal
uio
usb usb-storage: implement "soft" unbinding 2008-07-21 15:15:54 -07:00
video export c2p 2008-07-20 17:24:39 -07:00
virtio
w1
watchdog
xen Merge branch 'x86/paravirt-spinlocks' into x86/for-linus 2008-07-21 16:45:56 +02:00
zorro zorro: use memory_read_from_buffer 2008-07-20 17:24:38 -07:00
Kconfig
Makefile gpu: re-order GPU subdirectory vs char for AGP vs DRM startup. 2008-07-21 08:42:49 +10:00