From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: christopher.j.zurcher@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Thu, 22 Aug 2019 15:02:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Aug 2019 15:02:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,418,1559545200"; d="scan'208";a="203563447" Received: from cjzurch-desk.amr.corp.intel.com ([10.9.70.181]) by fmsmga004.fm.intel.com with ESMTP; 22 Aug 2019 15:02:17 -0700 From: "Zurcher, Christopher J" To: devel@edk2.groups.io Cc: Michael D Kinney , Jiewen Yao , Jian J Wang , Liming Gao Subject: [PATCH v5 3/4] MdeModulePkg/ScsiBusDxe: Clean up Peripheral Type check Date: Thu, 22 Aug 2019 15:02:14 -0700 Message-Id: <20190822220215.24536-4-christopher.j.zurcher@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190822220215.24536-1-christopher.j.zurcher@intel.com> References: <20190822220215.24536-1-christopher.j.zurcher@intel.com> Replacing "magic numbers" in the Peripheral Type check with defines for the reserved range from IndustryStandard/Scsi.h Cc: Michael D Kinney Cc: Jiewen Yao Cc: Jian J Wang Cc: Liming Gao Signed-off-by: Christopher J Zurcher --- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index c4069aec0f..1caffd38cd 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -2,7 +2,7 @@ SCSI Bus driver that layers on every SCSI Pass Thru and Extended SCSI Pass Thru protocol in the system. -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -1368,7 +1368,8 @@ DiscoverScsiDevice ( goto Done; } - if (0x1e >= InquiryData->Peripheral_Type && InquiryData->Peripheral_Type >= 0xa) { + if ((InquiryData->Peripheral_Type >= EFI_SCSI_TYPE_RESERVED_LOW) && + (InquiryData->Peripheral_Type <= EFI_SCSI_TYPE_RESERVED_HIGH)) { ScsiDeviceFound = FALSE; goto Done; } -- 2.16.2.windows.1