linux-stable/drivers/scsi
Bart Van Assche 785538bfdd scsi: sd: Revert "Rework asynchronous resume support"
Although commit 88f1669019 ("scsi: sd: Rework asynchronous resume support")
eliminates a delay for some ATA disks after resume, it causes resume of ATA
disks to fail on other setups. See also:

 * "Resume process hangs for 5-6 seconds starting sometime in 5.16"
   (https://bugzilla.kernel.org/show_bug.cgi?id=215880).

 * Geert's regression report
   (https://lore.kernel.org/linux-scsi/alpine.DEB.2.22.394.2207191125130.1006766@ramsan.of.borg/).

This is what I understand about this issue:

 * During resume, ata_port_pm_resume() starts the SCSI error handler.  This
   changes the SCSI host state into SHOST_RECOVERY and causes
   scsi_queue_rq() to return BLK_STS_RESOURCE.

 * sd_resume() calls sd_start_stop_device() for ATA devices. That function
   in turn calls sd_submit_start() which tries to submit a START STOP UNIT
   command. That command can only be submitted after the SCSI error handler
   has changed the SCSI host state back to SHOST_RUNNING.

 * The SCSI error handler runs on its own thread and calls
   schedule_work(&(ap->scsi_rescan_task)). That causes
   ata_scsi_dev_rescan() to be called from the context of a kernel
   workqueue. That call hangs in blk_mq_get_tag(). I'm not sure why - maybe
   because all available tags have been allocated by sd_submit_start()
   calls (this is a guess).

Link: https://lore.kernel.org/r/20220816172638.538734-1-bvanassche@acm.org
Fixes: 88f1669019 ("scsi: sd: Rework asynchronous resume support")
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: gzhqyz@gmail.com
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: gzhqyz@gmail.com
Reported-and-tested-by: Vlastimil Babka <vbabka@suse.cz>
Tested-by: John Garry <john.garry@huawei.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-08-22 22:45:25 -04:00
..
aacraid SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
aic7xxx
aic94xx scsi: libsas: Introduce struct smp_rps_resp 2022-06-10 13:08:06 -04:00
arcmsr
arm
be2iscsi scsi: iscsi: Remove iscsi_get_task back_lock requirement 2022-06-21 21:19:23 -04:00
bfa
bnx2fc
bnx2i scsi: iscsi: Fix session removal on shutdown 2022-06-21 21:14:54 -04:00
csiostor
cxgbi scsi: iscsi: Rename iscsi_conn_queue_work() 2022-06-21 21:19:22 -04:00
cxlflash scsi: cxlflash: Include missing linux/irqdomain.h 2022-07-28 16:22:12 +10:00
device_handler scsi/device_handlers: Use the new blk_opf_t type 2022-07-14 12:14:32 -06:00
elx
esas2r scsi: esas2r: Fix typo in comment 2022-05-23 23:24:09 -04:00
fcoe scsi: fcoe: Remove redundant assignment to variable 'wlen' 2022-06-27 22:45:25 -04:00
fnic SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
hisi_sas scsi: hisi_sas: Modify v3 HW SATA completion error processing 2022-07-18 23:04:12 -04:00
ibmvscsi scsi: ibmvfc: Store vhost pointer during subcrq allocation 2022-06-16 21:42:04 -04:00
ibmvscsi_tgt
isci scsi: isci: Fix typo in comment 2022-05-23 23:24:10 -04:00
libfc
libsas scsi: libsas: Resume SAS host for phy reset or enable via sysfs 2022-07-18 23:04:12 -04:00
lpfc scsi: lpfc: Check the return value of alloc_workqueue() 2022-08-01 19:25:06 -04:00
megaraid Merge branch '5.20/scsi-queue' into 6.0/scsi-fixes 2022-08-19 17:28:54 -04:00
mpi3mr SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
mpt3sas SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
mvsas
pcmcia
pm8001 SCSI misc on 20220813 2022-08-13 13:41:48 -07:00
qedf scsi: qedf: Fix typo in comment 2022-05-23 23:24:10 -04:00
qedi scsi: iscsi: Fix session removal on shutdown 2022-06-21 21:14:54 -04:00
qla2xxx scsi: qla2xxx: Disable ATIO interrupt coalesce for quad port ISP27XX 2022-08-11 21:57:15 -04:00
qla4xxx
smartpqi scsi: smartpqi: Update version to 2.1.18-045 2022-07-13 23:42:05 -04:00
snic SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
sym53c8xx_2 scsi: sym53c8xx_2: Remove redundant "with" 2022-06-21 21:41:19 -04:00
.gitignore
3w-9xxx.c
3w-9xxx.h
3w-sas.c
3w-sas.h
3w-xxxx.c
3w-xxxx.h
53c700.c
53c700.h
53c700.scr
53c700_d.h_shipped
a100u2w.c
a100u2w.h
a2091.c scsi: a2091: Convert m68k WD33C93 drivers to DMA API 2022-07-07 17:01:22 -04:00
a2091.h
a3000.c scsi: a3000: Convert m68k WD33C93 drivers to DMA API 2022-07-07 17:01:22 -04:00
a3000.h
a4000t.c
advansys.c
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c
aha1740.h
am53c974.c
atari_scsi.c
atp870u.c
atp870u.h
BusLogic.c scsi: BusLogic: Remove bus_to_virt() 2022-06-27 22:52:05 -04:00
BusLogic.h
bvme6000_scsi.c
ch.c scsi: ch: Do not initialise statics to 0 2022-07-26 22:13:29 -04:00
constants.c
dc395x.c
dc395x.h
dmx3191d.c
esp_scsi.c
esp_scsi.h
fdomain.c
fdomain.h
fdomain_isa.c
fdomain_pci.c
FlashPoint.c scsi: FlashPoint: Remove redundant variable bm_int_st 2022-08-01 19:52:03 -04:00
g_NCR5380.c
gvp11.c scsi: gvp11.c: Fix DMA mask calculation error 2022-07-13 23:18:26 -04:00
gvp11.h
hosts.c SCSI misc on 20220813 2022-08-13 13:41:48 -07:00
hpsa.c
hpsa.h
hpsa_cmd.h
hptiop.c
hptiop.h
imm.c
imm.h
initio.c
initio.h
ipr.c scsi: ipr: Fix missing/incorrect resource cleanup in error case 2022-06-07 22:05:14 -04:00
ipr.h
ips.c
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c scsi: iscsi_tcp: Drop target_alloc use 2022-06-21 21:19:23 -04:00
iscsi_tcp.h scsi: iscsi: Run recv path from workqueue 2022-06-21 21:19:22 -04:00
jazz_esp.c
Kconfig scsi: dpt_i2o: Remove obsolete driver 2022-06-27 22:56:21 -04:00
lasi700.c
libiscsi.c scsi: libiscsi: Improve conn_send_pdu API 2022-06-21 21:19:23 -04:00
libiscsi_tcp.c scsi: iscsi: Remove iscsi_get_task back_lock requirement 2022-06-21 21:19:23 -04:00
mac53c94.c
mac53c94.h
mac_esp.c
mac_scsi.c
Makefile scsi: dpt_i2o: Remove obsolete driver 2022-06-27 22:56:21 -04:00
megaraid.c
megaraid.h
mesh.c powerpc/powermac: Remove empty function note_scsi_host() 2022-06-26 10:29:44 +10:00
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c
mvumi.h
myrb.c scsi: myrb: Fix up null pointer access on myrb_cleanup() 2022-05-23 23:24:10 -04:00
myrb.h
myrs.c
myrs.h
ncr53c8xx.c
ncr53c8xx.h
NCR5380.c
NCR5380.h
nsp32.c
nsp32.h
nsp32_debug.c
nsp32_io.h
pmcraid.c scsi: pmcraid: Fix missing resource cleanup in error case 2022-06-07 22:05:14 -04:00
pmcraid.h
ppa.c
ppa.h
ps3rom.c
qla1280.c
qla1280.h
qlogicfas.c
qlogicfas408.c
qlogicfas408.h
qlogicpti.c
qlogicpti.h
raid_class.c
script_asm.pl
scsi.c scsi: core: Simplify LLD module reference counting 2022-08-01 19:45:14 -04:00
scsi_bsg.c
scsi_common.c
scsi_debug.c scsi: scsi_debug: Fix zone transition to full condition 2022-06-10 12:50:05 -04:00
scsi_debugfs.c
scsi_debugfs.h
scsi_devinfo.c
scsi_dh.c
scsi_error.c SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
scsi_ioctl.c scsi: core: Fix warning in scsi_alloc_sgtables() 2022-07-26 21:54:30 -04:00
scsi_lib.c scsi: core: Fix passthrough retry counter handling 2022-08-19 21:39:47 -04:00
scsi_lib_dma.c
scsi_logging.c
scsi_logging.h
scsi_netlink.c
scsi_pm.c
scsi_priv.h scsi/core: Change the return type of scsi_noretry_cmd() into bool 2022-07-14 12:14:32 -06:00
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c scsi: core: Make sure that hosts outlive targets 2022-08-01 19:45:14 -04:00
scsi_sysctl.c
scsi_sysfs.c SCSI misc on 20220813 2022-08-13 13:41:48 -07:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c
scsi_transport_iscsi.c Merge branch '5.19/scsi-fixes' into 5.20/scsi-staging 2022-07-07 17:20:43 -04:00
scsi_transport_sas.c scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit 2022-07-19 11:11:49 +02:00
scsi_transport_spi.c
scsi_transport_srp.c
scsicam.c
sd.c scsi: sd: Revert "Rework asynchronous resume support" 2022-08-22 22:45:25 -04:00
sd.h scsi: sd: Revert "Rework asynchronous resume support" 2022-08-22 22:45:25 -04:00
sd_dif.c
sd_zbc.c treewide: Rename enum req_opf into enum req_op 2022-07-14 12:14:30 -06:00
sense_codes.h
ses.c
sg.c scsi: sg: Allow waiting for commands to complete on removed device 2022-07-18 22:33:04 -04:00
sgiwd93.c
sim710.c
sni_53c710.c
sr.c block: simplify disk shutdown 2022-06-28 06:30:26 -06:00
sr.h
sr_ioctl.c
sr_vendor.c
st.c blk-mq: remove the done argument to blk_execute_rq_nowait 2022-05-28 06:15:27 -06:00
st.h
st_options.h
stex.c
storvsc_drv.c scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq 2022-08-11 22:25:23 -04:00
sun3_scsi.c
sun3_scsi_vme.c
sun3x_esp.c
sun_esp.c
virtio_scsi.c
vmw_pvscsi.c
vmw_pvscsi.h scsi: vmw_pvscsi: Expand vcpuHint to 16 bits 2022-06-07 21:30:56 -04:00
wd33c93.c
wd33c93.h
wd719x.c
wd719x.h
xen-scsifront.c
zalon.c
zorro7xx.c
zorro_esp.c