linux/include/scsi
Damien Le Moal b09d7f8fd5 scsi: sd: Fix system start for ATA devices
It is not always possible to keep a device in the runtime suspended state
when a system level suspend/resume cycle is executed. E.g. for ATA devices
connected to AHCI adapters, system resume resets the ATA ports, which
causes connected devices to spin up. In such case, a runtime suspended disk
will incorrectly be seen with a suspended runtime state because the device
is not resumed by sd_resume_system(). The power state seen by the user is
different than the actual device physical power state.

Fix this issue by introducing the struct scsi_device flag
force_runtime_start_on_system_start. When set, this flag causes
sd_resume_system() to request a runtime resume operation for runtime
suspended devices. This results in the user seeing the device runtime_state
as active after a system resume, thus correctly reflecting the device
physical power state.

Fixes: 9131bff6a9 ("scsi: core: pm: Only runtime resume if necessary")
Cc: <stable@vger.kernel.org>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20231120225631.37938-3-dlemoal@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-11-24 20:44:21 -05:00
..
fc
fc_frame.h
fcoe_sysfs.h
iscsi_if.h
iscsi_proto.h
iser.h
libfc.h
libfcoe.h
libiscsi.h
libiscsi_tcp.h
libsas.h scsi: libsas: Declare sas_discover_end_dev() static 2023-09-13 21:06:44 -04:00
sas.h
sas_ata.h
scsi.h scsi: core: ata: Do no try to probe for CDL on old drives 2023-09-21 21:07:23 -04:00
scsi_bsg_iscsi.h
scsi_cmnd.h scsi: core: Allow libata to complete successful commands via EH 2023-05-22 17:05:18 -04:00
scsi_common.h scsi: Add support for block PR read keys/reservation 2023-04-11 21:55:35 -04:00
scsi_dbg.h
scsi_device.h scsi: sd: Fix system start for ATA devices 2023-11-24 20:44:21 -05:00
scsi_devinfo.h
scsi_dh.h
scsi_driver.h
scsi_eh.h
scsi_host.h SCSI misc on 20231102 2023-11-02 15:13:50 -10:00
scsi_ioctl.h scsi: replace the fmode_t argument to scsi_ioctl with a simple bool 2023-06-12 08:04:04 -06:00
scsi_proto.h scsi: Add support for block PR read keys/reservation 2023-04-11 21:55:35 -04:00
scsi_status.h
scsi_tcq.h
scsi_transport.h
scsi_transport_fc.h
scsi_transport_iscsi.h scsi: iscsi: Remove unused extern declaration iscsi_lookup_iface() 2023-07-25 21:55:11 -04:00
scsi_transport_sas.h
scsi_transport_spi.h
scsi_transport_srp.h
scsicam.h
sg.h
srp.h
viosrp.h