From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id BA70482176 for ; Thu, 23 Feb 2017 14:34:00 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A756C28; Thu, 23 Feb 2017 14:34:00 -0800 (PST) Received: from u200856.usa.arm.com (u201426.usa.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 528C83F483; Thu, 23 Feb 2017 14:34:00 -0800 (PST) From: Jeremy Linton To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ryan.harkin@linaro.org, linaro-uefi@lists.linaro.org, ard.biesheuvel@linaro.org, Steve.Capper@arm.com, Jeremy Linton Date: Thu, 23 Feb 2017 16:33:49 -0600 Message-Id: <20170223223355.11383-3-jeremy.linton@arm.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170223223355.11383-1-jeremy.linton@arm.com> References: <20170223223355.11383-1-jeremy.linton@arm.com> Subject: [PATCH v3 2/7] MdePkg IndustryStandard/Scsi.h: Add sense code macro X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 22:34:00 -0000 Add some definitions to mask the sense key from sense data, and check the validity of the returned sense data. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeremy Linton --- MdePkg/Include/IndustryStandard/Scsi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/Scsi.h b/MdePkg/Include/IndustryStandard/Scsi.h index 0d81314..802479e 100644 --- a/MdePkg/Include/IndustryStandard/Scsi.h +++ b/MdePkg/Include/IndustryStandard/Scsi.h @@ -369,6 +369,8 @@ typedef struct { // // Sense Key // +#define EFI_SCSI_REQUEST_SENSE_ERROR (0x70) +#define EFI_SCSI_SK_VALUE(byte) (byte&0x0F) #define EFI_SCSI_SK_NO_SENSE (0x0) #define EFI_SCSI_SK_RECOVERY_ERROR (0x1) #define EFI_SCSI_SK_NOT_READY (0x2) -- 2.9.3