Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2884640pxv; Sun, 4 Jul 2021 00:55:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRU4Sb/BzRfijoFOVWp0f0mqEy5/+0uPHwXhJ4VNoXVLYC5FA66W37M0eF1u4i04urQSoA X-Received: by 2002:a92:8e45:: with SMTP id k5mr6404675ilh.116.1625385336589; Sun, 04 Jul 2021 00:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625385336; cv=none; d=google.com; s=arc-20160816; b=D1tkG23K44SE9HJanke3ItmO2m3rvHw6zwvPAFLzXu1lsJPJQN/QkTItcwQnjIbxcC P/KjKD/x0XC7smbqvR+pAc6XPF/V8WRuSXl0n3HiH6uILaeZy3RZIqd57BTD6yRQS/nT 1MP2FRP2wvzwMVbPvOJu4LfrEFGH2+8v0c36gbSJ/jevu9SaVVVW3ABwPYyq88r3i6AW nbQWQkbFiBflHdCtIPXYdLk1LQBRB51B03fRMBWxMmvj58ATUxOuOFJJSs8JtZEgNw5C 5XnvuUHaY4Shk7QTuFWLwU5Z8bY147E98IS8f8EBcJPbG3blgoXG288kyt37H84eiw9K bUGA== 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=no5A6K6xrws1oGIe9cukOlY2efbPFdfeKgZpKHgONvM=; b=M/mqmufbWMQP7nx6hMhbPSjoj5H92GcDyNj0p9SIrOqzz71CkqyDWVCE7TAeeLrLDo 7C2WfxDF2hB0JCI7segRPze3y6UXNklTDaQQEdj2OUgj74C69WSvcJGJX2FsZSIpRVYO MnSz/C/bTndpmKwQxmSWdQyDuvkVH96JUURtCqYa4snUyC7VbMjBfdYzfswKvCPV3Ed3 ako3mGwYhI2h9INyXv9icTYDTTvi429f8qgGCjq+1wqm5h0ZrtVrgT2q5+flPiGIk1Cx enLTH/rZVK0hfBWF0nggwaDjS5HmSm+UJvx1EpzlQ/maLWEZx0l690dt6j97M3ck1uqN TopA== 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 k19si9979524ion.69.2021.07.04.00.55.12; Sun, 04 Jul 2021 00:55:36 -0700 (PDT) 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 S229563AbhGDH4z (ORCPT + 99 others); Sun, 4 Jul 2021 03:56:55 -0400 Received: from comms.puri.sm ([159.203.221.185]:33876 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbhGDH4z (ORCPT ); Sun, 4 Jul 2021 03:56:55 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id E0C7FDFF0F; Sun, 4 Jul 2021 00:54:19 -0700 (PDT) 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 fT1MghGrs0sK; Sun, 4 Jul 2021 00:54:18 -0700 (PDT) From: Martin Kepplinger To: martin.kepplinger@puri.sm, bvanassche@acm.org Cc: hch@infradead.org, jejb@linux.ibm.com, kernel@puri.sm, 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 v6 1/3] scsi: devinfo: add new flag BLIST_MEDIA_CHANGE Date: Sun, 4 Jul 2021 09:54:01 +0200 Message-Id: <20210704075403.147114-2-martin.kepplinger@puri.sm> In-Reply-To: <20210704075403.147114-1-martin.kepplinger@puri.sm> References: <20210704075403.147114-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Bart Van Assche --- 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