From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: christopher.j.zurcher@intel.com) Received: from mga05.intel.com (mga05.intel.com []) by groups.io with SMTP; Fri, 06 Sep 2019 15:12:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2019 15:12:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,474,1559545200"; d="scan'208";a="195568583" Received: from cjzurch-desk.amr.corp.intel.com ([10.9.70.181]) by orsmga002.jf.intel.com with ESMTP; 06 Sep 2019 15:12:17 -0700 From: "Zurcher, Christopher J" To: devel@edk2.groups.io Cc: Michael D Kinney , Jiewen Yao , Jian J Wang , Liming Gao Subject: [PATCH v6 3/4] MdeModulePkg/ScsiBusDxe: Clean up Peripheral Type check Date: Fri, 6 Sep 2019 15:12:15 -0700 Message-Id: <20190906221217.34180-4-christopher.j.zurcher@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190906221217.34180-1-christopher.j.zurcher@intel.com> References: <20190906221217.34180-1-christopher.j.zurcher@intel.com> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546 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