Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3526738pxv; Mon, 28 Jun 2021 06:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHcVZ2Myk0X6fCmjQL3DyMc+0uYcm9zFgBBWLwibFLnXCYEZ8IP04Ih2IUOVzeUjUWld3t X-Received: by 2002:a17:906:234e:: with SMTP id m14mr24481501eja.217.1624887586761; Mon, 28 Jun 2021 06:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624887586; cv=none; d=google.com; s=arc-20160816; b=Qrs2gKtAjLz/yjQ4619L+yi4KaOmTjhLerhTLBnfDlID23qiI+ttilDeHX5Cn3vZdY YCroxxstQLbg6jt2d/B33pAHb7udBBtCpS38czN4UfxzYptr+/Oj3jd6llEqS7SOQBKL UBg49yL1tX4hys7Rr8sadysRjG5IF0/iqxUiDZqMimWKi2IET9Cih9oObsxn6KuXyK8g FDD9g8pi5TV5xeBtD4CRlVDjYvWgycqR34qJ1sneadtjcgwFyGCzKPXydr2bLlQ6z7f/ sKpLpMoUa+NWfMx+QAOyMkP7fPFc59ambtIla9i6jsjbdax9OgKhIslsqbDMiMe6Qlyd jICw== 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=8gZKb5wuGN9jO2gFx0/S9ZBKfbyWGDlJHQ3IvT/8OJ8=; b=PEbipAPr/BLEeYI0WzGp4MjQ08eL8xbH2ssIqIL0VqXz9DotAvoaHocpECrYvVKxl6 Hc3PIgKWRKUnIhhzYx+DsLU9G20lD32nc9Lv1BbnZPm0O0spTtKGiOQXywdeYbq6CeaO XGF+vP//XyNAlB7Q6Tj2DrwNcxuEV4gUTydRtHkMH5LzxzFmu2fiD8z0s3sb6MWK7y5k i1fMP4/FZkAvT/Lwa2Rk6gjJLmvP7DA+uWyHGKcziATwDAj2612cHD7Hg0i5P7E296bR j2DjWpkBkXPglkU2vh6vDVYhtpDLnQxk2pM+dh00bo2LMOWYfR60YUbkbcvcUaTNsEgE Orgg== 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 y23si13690541ejk.380.2021.06.28.06.38.58; Mon, 28 Jun 2021 06:39:46 -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 S232321AbhF1Nhi (ORCPT + 99 others); Mon, 28 Jun 2021 09:37:38 -0400 Received: from comms.puri.sm ([159.203.221.185]:47356 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232087AbhF1NhA (ORCPT ); Mon, 28 Jun 2021 09:37:00 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 8A547E01BB; Mon, 28 Jun 2021 06:34:33 -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 XCCfshehQNc1; Mon, 28 Jun 2021 06:34:32 -0700 (PDT) From: Martin Kepplinger 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 Message-Id: <20210628133412.1172068-2-martin.kepplinger@puri.sm> In-Reply-To: <20210628133412.1172068-1-martin.kepplinger@puri.sm> References: <20210628133412.1172068-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 --- 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