linux-stable/drivers/usb/storage
Seth Forshee f02fe890ec usb_storage: Don't freeze in usb-stor-scan
Scanning cannot be run during suspend or hibernation, but if
usb-stor-scan freezes another thread waiting on scanning to
complete may fail to freeze.

However, if usb-stor-scan is left freezable without ever actually
freezing then the freezer will wait on it to exit, and threads
waiting for scanning to finish will no longer be blocked. One
problem with this approach is that usb-stor-scan has a delay to
wait for devices to settle (which is currently the only point where
it can freeze). To work around this we can request that the freezer
send a fake signal when freezing, then use interruptible sleep to
wake the thread early when freezing happens.

To make this happen, the following changes are made to
usb-stor-scan:

 * Use set_freezable_with_signal() instead of set_freezable() to
   request a fake signal when freezing

 * Use wait_event_interruptible_timeout() instead of
   wait_event_freezable_timeout() to avoid freezing

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-22 15:21:15 -07:00
..
alauda.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cypress_atacb.c
datafab.c
debug.c
debug.h
ene_ub6250.c Staging: Merge ENE UB6250 MS card codes from keucr to drivers/usb/storage/ene_ub6250.c 2011-07-08 14:12:52 -07:00
freecom.c usb: storage: freecom: Fixed several coding style issues. 2010-08-10 14:35:39 -07:00
initializers.c
initializers.h
isd200.c [SCSI] usb-storage: do not increment cmd->serial_number 2011-05-01 10:23:09 -05:00
jumpshot.c
karma.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-07-25 23:26:34 -07:00
libusual.c
Makefile Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-03-16 15:19:35 -07:00
onetouch.c USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00
option_ms.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
option_ms.h
protocol.c
protocol.h
realtek_cr.c Realtek cr: Add autosuspend function. 2011-07-01 14:53:42 -07:00
scsiglue.c Fix common misspellings 2011-03-31 11:26:23 -03:00
scsiglue.h
sddr09.c USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
sddr55.c
shuttle_usbat.c Fix common misspellings 2011-03-31 11:26:23 -03:00
sierra_ms.c USB: Remove delay_t unused variable from sierra_ms.c driver initialisation code 2011-03-02 19:52:29 -05:00
sierra_ms.h
transport.c usb-storage: redo incorrect reads 2011-06-07 09:05:42 -07:00
transport.h
uas.c Merge branch 'usb-next' into musb-merge 2010-12-16 10:05:06 -08:00
unusual_alauda.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_cypress.h USB: usb-storage: unusual_devs update for Cypress ATACB 2011-01-22 18:31:26 -08:00
unusual_datafab.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_devs.h USB: usb-storage: unusual_devs entry for ARM V2M motherboard. 2011-08-08 12:34:46 -07:00
unusual_ene_ub6250.h Staging: Merge ENE UB6250 SD card codes from keucr to drivers/usb/storage 2011-03-07 13:40:59 -08:00
unusual_freecom.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_isd200.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_jumpshot.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_karma.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_onetouch.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_realtek.h usb-storage: fix up the unusual_realtek device list 2011-05-17 11:56:28 -07:00
unusual_sddr09.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_sddr55.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_usbat.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
usb.c usb_storage: Don't freeze in usb-stor-scan 2011-08-22 15:21:15 -07:00
usb.h usb-storage: redo incorrect reads 2011-06-07 09:05:42 -07:00
usual-tables.c Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-03-16 15:19:35 -07:00