[edk2-devel] [PATCH v5 3/4] MdeModulePkg/ScsiBusDxe: Clean up Peripheral Type check
Wu, Hao A
hao.a.wu at intel.com
Tue Aug 27 03:03:15 UTC 2019
> -----Original Message-----
> From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of
> Zurcher, Christopher J
> Sent: Friday, August 23, 2019 6:02 AM
> To: devel at edk2.groups.io
> Cc: Kinney, Michael D; Yao, Jiewen; Wang, Jian J; Gao, Liming
> Subject: [edk2-devel] [PATCH v5 3/4] MdeModulePkg/ScsiBusDxe: Clean up
> Peripheral Type check
>
> 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 at intel.com>
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Liming Gao <liming.gao at intel.com>
> Signed-off-by: Christopher J Zurcher <christopher.j.zurcher at intel.com>
> ---
> 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.<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)) {
Reviewed-by: Hao A Wu <hao.a.wu at intel.com>
Best Regards,
Hao Wu
> ScsiDeviceFound = FALSE;
> goto Done;
> }
> --
> 2.16.2.windows.1
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#46407): https://edk2.groups.io/g/devel/message/46407
Mute This Topic: https://groups.io/mt/32994944/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list