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 EF4BA81E12 for ; Mon, 14 Nov 2016 13:10:13 -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 9322EAD7; Mon, 14 Nov 2016 13:10:18 -0800 (PST) Received: from u200856.usa.arm.com (u201426.usa.arm.com [10.118.28.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2B5BA3F218; Mon, 14 Nov 2016 13:10:18 -0800 (PST) From: Jeremy Linton To: edk2-devel@lists.01.org Cc: linaro-uefi@lists.linaro.org, ryan.harkin@linaro.org, leif.lindholm@linaro.org, steve.capper@arm.com, evan.lloyd@arm.com, daniil.egranov@arm.com, Jeremy Linton Date: Mon, 14 Nov 2016 15:09:42 -0600 Message-Id: <1479157789-14674-2-git-send-email-jeremy.linton@arm.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1479157789-14674-1-git-send-email-jeremy.linton@arm.com> References: <1479157789-14674-1-git-send-email-jeremy.linton@arm.com> Subject: [PATCH 1/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: Mon, 14 Nov 2016 21:10:14 -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.5.5