diff options
author | Martin Kepplinger <martin.kepplinger@puri.sm> | 2021-07-04 09:54:02 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-07-21 23:48:34 -0400 |
commit | ed4246d37f3b94e429d020cac692434a00bae4cc (patch) | |
tree | 931be0a89e21c6786ef64fcbbb8d9f614e6bb29a /drivers/ipack/Kconfig | |
parent | f591a2e0548da88130c7b1c79f1f735273adc683 (diff) |
scsi: sd: REQUEST SENSE for BLIST_IGN_MEDIA_CHANGE devices in runtime_resume()
For SD card reader devices that have the BLIST_IGN_MEDIA_CHANGE flag
set, a MEDIUM MAY HAVE CHANGED unit attention is established after
resuming from runtime suspend. Send a REQUEST SENSE to consume the UA.
The "downside" is that for these devices we now rely on users to not
change the medium (SD card) *during* a runtime suspend/resume cycle,
i.e. when not unmounting.
To enable runtime PM for an SD cardreader (device number 0:0:0:0), do:
echo 0 > /sys/module/block/parameters/events_dfl_poll_msecs
echo 1000 > /sys/bus/scsi/devices/0:0:0:0/power/autosuspend_delay_ms
echo auto > /sys/bus/scsi/devices/0:0:0:0/power/control
[mkp: use scsi_device flag instead of poking at BLIST]
Link: https://lore.kernel.org/r/20210704075403.147114-3-martin.kepplinger@puri.sm
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ipack/Kconfig')
0 files changed, 0 insertions, 0 deletions