summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorZurcher, Christopher J <christopher.j.zurcher@intel.com>2019-09-27 10:19:59 +0800
committerHao A Wu <hao.a.wu@intel.com>2019-09-29 16:43:46 +0800
commit1ff7ed2cfa64ba9870221f1eee72b05905e0a0b5 (patch)
treedf6cb36a86efba2fcdd5692e3c691af0233cb382 /MdeModulePkg/Bus
parent43bb4e379b20759284ea499d17c8f503a127b666 (diff)
downloadedk2-1ff7ed2cfa64ba9870221f1eee72b05905e0a0b5.tar.gz
edk2-1ff7ed2cfa64ba9870221f1eee72b05905e0a0b5.tar.bz2
edk2-1ff7ed2cfa64ba9870221f1eee72b05905e0a0b5.zip
MdeModulePkg/ScsiBusDxe: Clean up Peripheral Type check
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 <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c5
1 files 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.<BR>
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
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;
}