linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Kepplinger <martin.kepplinger@puri.sm>
To: martin.kepplinger@puri.sm
Cc: bvanassche@acm.org, jejb@linux.ibm.com,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
	stern@rowland.harvard.edu
Subject: [PATCH v4 1/3] scsi: devinfo: add new flag BLIST_MEDIA_CHANGE
Date: Mon, 28 Jun 2021 15:34:10 +0200	[thread overview]
Message-ID: <20210628133412.1172068-2-martin.kepplinger@puri.sm> (raw)
In-Reply-To: <20210628133412.1172068-1-martin.kepplinger@puri.sm>

add a new flag for devices that issue MEDIA CHANGE unit attentions
when actually no medium changed. Drivers can then act accordingly in
case they need to work around it, i.e. in resume().

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 include/scsi/scsi_devinfo.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 3fdb322d4c4b..766fa876598e 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -28,7 +28,8 @@
 #define BLIST_LARGELUN		((__force blist_flags_t)(1ULL << 9))
 /* override additional length field */
 #define BLIST_INQUIRY_36	((__force blist_flags_t)(1ULL << 10))
-#define __BLIST_UNUSED_11	((__force blist_flags_t)(1ULL << 11))
+/* ignore one MEDIA CHANGE unit attention after resuming from runtime suspend */
+#define BLIST_MEDIA_CHANGE	((__force blist_flags_t)(1ULL << 11))
 /* do not do automatic start on add */
 #define BLIST_NOSTARTONADD	((__force blist_flags_t)(1ULL << 12))
 #define __BLIST_UNUSED_13	((__force blist_flags_t)(1ULL << 13))
@@ -73,8 +74,7 @@
 #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \
 			       (__force blist_flags_t) \
 			       ((__force __u64)__BLIST_LAST_USED - 1ULL)))
-#define __BLIST_UNUSED_MASK (__BLIST_UNUSED_11 | \
-			     __BLIST_UNUSED_13 | \
+#define __BLIST_UNUSED_MASK (__BLIST_UNUSED_13 | \
 			     __BLIST_UNUSED_14 | \
 			     __BLIST_UNUSED_15 | \
 			     __BLIST_UNUSED_16 | \
-- 
2.30.2


  reply	other threads:[~2021-06-28 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 13:34 [PATCH v4 0/3] fix runtime PM for SD card readers Martin Kepplinger
2021-06-28 13:34 ` Martin Kepplinger [this message]
2021-06-30  4:20   ` [PATCH v4 1/3] scsi: devinfo: add new flag BLIST_MEDIA_CHANGE Bart Van Assche
2021-06-28 13:34 ` [PATCH v4 2/3] scsi: sd: send REQUEST SENSE for BLIST_MEDIA_CHANGE devices in runtime_resume() Martin Kepplinger
2021-06-30  4:18   ` Bart Van Assche
2021-06-28 13:34 ` [PATCH v4 3/3] scsi: devinfo: add BLIST_MEDIA_CHANGE for Ultra HS-SD/MMC usb cardreaders Martin Kepplinger
2021-06-30  4:20   ` 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=20210628133412.1172068-2-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-pm@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).