diff mbox series

[v2,3/3] scsi: sd: Documentation: describe ignore_resume_medium_changed

Message ID 20210112093329.3639-4-martin.kepplinger@puri.sm
State New
Headers show
Series scsi: add runtime PM workaround for SD cardreaders | expand

Commit Message

Martin Kepplinger Jan. 12, 2021, 9:33 a.m. UTC
Add notes about the new sd sysfs knob that works around problems
with runtime PM for certain types of SD cardreaders.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 Documentation/scsi/sd-parameters.rst | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/scsi/sd-parameters.rst b/Documentation/scsi/sd-parameters.rst
index 87d554008bfb..a77b9fdffddf 100644
--- a/Documentation/scsi/sd-parameters.rst
+++ b/Documentation/scsi/sd-parameters.rst
@@ -25,3 +25,17 @@  To modify the caching mode without making the change persistent, prepend
 "temporary " to the cache type string. E.g.::
 
   # echo "temporary write back" > cache_type
+
+ignore_resume_medium_changed (RW)
+---------------------------------
+Some SD cardreaders deliver a "media changed" unit attention (that results
+in I/O error) when they are resumed from suspend. This prevents users
+to use runtime PM with these devices. To enable runtime PM for an SD
+cardreader (here, device number 0:0:0:0), do something like:
+
+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
+
+And if using the mounted disk filesystem causes trouble, try setting
+ignore_resume_medium_changed to 1.