mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
cd5432c712
In the scenario of entering hibernation with udisk in the system, if the udisk was gone or resume fail in the thaw phase of hibernation. Its state will be set to NOTATTACHED. At this point, usb_hub_wq was already freezed and can't not handle disconnect event. Next, in the poweroff phase of hibernation, SYNCHRONIZE_CACHE SCSI command will be sent to this udisk when poweroff this scsi device, which will cause uas_submit_urbs to be called to submit URB for sense/data/cmd pipe. However, these URBs will submit fail as device was set to NOTATTACHED state. Then, uas_submit_urbs will return a value SCSI_MLQUEUE_DEVICE_BUSY to the caller. That will lead the SCSI layer go into an ugly loop and system fail to go into hibernation. On the other hand, when we specially check for -ENODEV in function uas_queuecommand_lck, returning DID_ERROR to SCSI layer will cause device poweroff fail and system shutdown instead of entering hibernation. To fix this issue, let uas_submit_urbs to return original generic error when submitting URB failed. At the same time, we need to translate -ENODEV to DID_NOT_CONNECT for the SCSI layer. Suggested-by: Oliver Neukum <oneukum@suse.com> Cc: stable@vger.kernel.org Signed-off-by: Weitao Wang <WeitaoWang-oc@zhaoxin.com> Link: https://lore.kernel.org/r/20240306180814.4897-1-WeitaoWang-oc@zhaoxin.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
alauda.c | ||
cypress_atacb.c | ||
datafab.c | ||
debug.c | ||
debug.h | ||
ene_ub6250.c | ||
freecom.c | ||
initializers.c | ||
initializers.h | ||
isd200.c | ||
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 | ||
transport.h | ||
uas-detect.h | ||
uas.c | ||
unusual_alauda.h | ||
unusual_cypress.h | ||
unusual_datafab.h | ||
unusual_devs.h | ||
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 | ||
unusual_usbat.h | ||
usb.c | ||
usb.h | ||
usual-tables.c |