Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3019947pxb; Tue, 12 Jan 2021 04:30:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLVtD41qUx16FoL7P/lGGrrREhVBghGGMU8oInJG+h79neUntd+duuUW3bnVY7Uc3cUzCW X-Received: by 2002:a17:906:2f07:: with SMTP id v7mr3020411eji.343.1610454640121; Tue, 12 Jan 2021 04:30:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610454640; cv=none; d=google.com; s=arc-20160816; b=oRvEfgz+FstCAKBdnRIbAGzOplHK72z55UCLS1aBXKQG3ymG/mDbHPwVaCnX4c42VS AqI+euHFYaM71NogTetl4GZyaTtNfAPNU6fpgyPEG9FRMoIS3FiP0laWjq7NHm5Jd6TO qs3yfv8Lu29tEZRw4qyz6VjuDRT01zwYEPW3kglwRMfvSOfKZu8Tw0VuLN3SZnN7WgTo LNgOLf3jnA/3ALE1FTK5NYruBl9YTxD36PimkBsUrptThlNfqXNJKVR8r950qjKRoFYY JtevdZOAySNihf5ZCWtdxoqSrpYFB2po85EN2RqfnSMRaCr1D0Sjhh42/DCgTj0hKfXf cpug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :message-id:date:subject:cc:to:from; bh=NWzlxluqXZygcwxr7qAk5PQSB5vZMPdv2yVnHxmt0uU=; b=StVwsEOmJ24v90pJA16e//ckx9SBSdeVXFKTKX+VQd+hn6/Xn/GWb+FEDVAFwRVQZo r6d/7OQLt6au+89Z1yAjhPgsfj+sQ/9XRnAHmPQCOZM1Wx2vB61koR38DXpx2SbZoIZX +JJYW9QPe4xdyMIpKm5cyf+fNqeAra4oWMVUpjhxxsF9HTc635D6l1sxvlm9uW3YhgQx GJloOX12KwYvzj/DNMDH5v2+EA+GnKpX62RsiuesYOfa/7lWd3zfltMjb/qTk41BjgOl sR5MXn2XjbgxN/yghoiYTIy6zvvqNtAxZfKJDBhImRoS3zhdmqcW058uqcApeAgCHxH/ driQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si461380edr.176.2021.01.12.04.30.16; Tue, 12 Jan 2021 04:30:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405968AbhALJfJ (ORCPT + 99 others); Tue, 12 Jan 2021 04:35:09 -0500 Received: from comms.puri.sm ([159.203.221.185]:33642 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731123AbhALJfJ (ORCPT ); Tue, 12 Jan 2021 04:35:09 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id D76FDDF42D; Tue, 12 Jan 2021 01:33:58 -0800 (PST) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YD_EqG3nAla5; Tue, 12 Jan 2021 01:33:58 -0800 (PST) From: Martin Kepplinger 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 Subject: [PATCH v2 3/3] scsi: sd: Documentation: describe ignore_resume_medium_changed Date: Tue, 12 Jan 2021 10:33:29 +0100 Message-Id: <20210112093329.3639-4-martin.kepplinger@puri.sm> In-Reply-To: <20210112093329.3639-1-martin.kepplinger@puri.sm> References: <20210112093329.3639-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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