linux-uconsole/drivers/usb/storage
Oliver Neukum 1bbdf7649f usb: uas: unconditionally bring back host after reset
commit cbeef22fd6 upstream.

Quoting Hans:

If we return 1 from our post_reset handler, then our disconnect handler
will be called immediately afterwards. Since pre_reset blocks all scsi
requests our disconnect handler will then hang in the scsi_remove_host
call.

This is esp. bad because our disconnect handler hanging for ever also
stops the USB subsys from enumerating any new USB devices, causes commands
like lsusb to hang, etc.

In practice this happens when unplugging some uas devices because the hub
code may see the device as needing a warm-reset and calls usb_reset_device
before seeing the disconnect. In this case uas_configure_endpoints fails
with -ENODEV. We do not want to print an error for this, so this commit
also silences the shost_printk for -ENODEV.

ENDQUOTE

However, if we do that we better drop any unconditional execution
and report to the SCSI subsystem that we have undergone a reset
but we are not operational now.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-03 17:04:30 +01:00
..
alauda.c
cypress_atacb.c
datafab.c
debug.c
debug.h
ene_ub6250.c USB: ene_usb6250: fix DMA to the stack 2017-05-25 14:30:07 +02:00
freecom.c
initializers.c
initializers.h
isd200.c usb: storage: return on error to avoid a null pointer dereference 2017-07-27 15:06:05 -07:00
jumpshot.c
karma.c
Kconfig
Makefile
onetouch.c
option_ms.c
option_ms.h
protocol.c
protocol.h
realtek_cr.c
scsiglue.c
scsiglue.h
sddr09.c
sddr55.c
shuttle_usbat.c
sierra_ms.c
sierra_ms.h
transport.c Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y 2016-12-02 09:09:00 +01:00
transport.h
uas-detect.h uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices 2017-12-09 18:42:37 +01:00
uas.c usb: uas: unconditionally bring back host after reset 2018-02-03 17:04:30 +01:00
unusual_alauda.h
unusual_cypress.h
unusual_datafab.h
unusual_devs.h USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID 2017-12-20 10:04:51 +01:00
unusual_ene_ub6250.h
unusual_freecom.h
unusual_isd200.h
unusual_jumpshot.h
unusual_karma.h
unusual_onetouch.h
unusual_realtek.h
unusual_sddr09.h
unusual_sddr55.h
unusual_uas.h uas: ignore UAS for Norelsys NS1068(X) chips 2018-01-17 09:35:32 +01:00
unusual_usbat.h
usb.c USB: uas: Add a new NO_REPORT_LUNS quirk 2016-04-20 15:42:07 +09:00
usb.h
usual-tables.c