From: Martin Kepplinger <martin.kepplinger@puri.sm>
To: jejb@linux.ibm.com, martin.petersen@oracle.com,
stern@rowland.harvard.edu, bvanassche@acm.org
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Kepplinger <martin.kepplinger@puri.sm>
Subject: [PATCH v2 3/3] scsi: sd: Documentation: describe ignore_resume_medium_changed
Date: Tue, 12 Jan 2021 10:33:29 +0100 [thread overview]
Message-ID: <20210112093329.3639-4-martin.kepplinger@puri.sm> (raw)
In-Reply-To: <20210112093329.3639-1-martin.kepplinger@puri.sm>
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 --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.
--
2.20.1
next prev parent reply other threads:[~2021-01-12 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 9:33 [PATCH v2 0/3] scsi: add runtime PM workaround for SD cardreaders Martin Kepplinger
2021-01-12 9:33 ` [PATCH v2 1/3] scsi: add expecting_media_change flag to error path Martin Kepplinger
2021-01-12 9:33 ` [PATCH v2 2/3] scsi: sd: add ignore_resume_medium_changed disk setting Martin Kepplinger
2021-01-12 9:33 ` Martin Kepplinger [this message]
2021-03-27 10:48 ` [PATCH v2 0/3] scsi: add runtime PM workaround for SD cardreaders Martin Kepplinger
2021-03-27 16:01 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210112093329.3639-4-martin.kepplinger@puri.sm \
--to=martin.kepplinger@puri.sm \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).