From: "Pete Batard" <pete@akeo.ie>
To: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
devel@edk2.groups.io
Cc: Leif Lindholm <leif@nuviainc.com>,
Andrei Warkentin <awarkentin@vmware.com>,
Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: Re: [edk2-platform][PATCH v1 2/3] Platforms/RaspberryPi: Fix DwUsbHostDxe ComponentName2 error checking
Date: Mon, 17 Aug 2020 12:17:16 +0100 [thread overview]
Message-ID: <ab857d11-c1b0-0273-2077-0724342729cc@akeo.ie> (raw)
In-Reply-To: <20200815202631.29690-3-Samer.El-Haj-Mahmoud@arm.com>
Same typo as previous patch:
On 2020.08.15 21:26, Samer El-Haj-Mahmoud wrote:
> Fix input param error checking for the DwUsbHostDxe ComponentName2
> protocol.
>
> This fixes https://github.com/pftf/RPi4/issues/86
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Pete Batard <pete@akeo.ie>
> Cc: Andrei Warkentin <awarkentin@vmware.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
> ---
> Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.h | 4 +++-
> Platform/RaspberryPi/Drivers/DwUsbHostDxe/ComponentName.c | 18 ++++++++++++++++++
> Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c | 2 +-
> 3 files changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.h b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.h
> index 106e5425355e..cf6c81b64ab5 100644
> --- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.h
> +++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.h
> @@ -1,5 +1,6 @@
> /** @file
> *
> + * Copyright (c) 2020, ARM Limited. All rights reserved.
> * Copyright (c) 2017-2018, Andrey Warkentin <andrey.warkentin@gmail.com>
> * Copyright (c) 2015-2016, Linaro Limited. All rights reserved.
> *
> @@ -121,8 +122,9 @@ typedef struct _DWUSB_OTGHC_DEV {
> UINT16 LastMicroFrame;
> } DWUSB_OTGHC_DEV;
>
> -extern EFI_COMPONENT_NAME_PROTOCOL gComponentName;
> +extern EFI_COMPONENT_NAME_PROTOCOL gComponentName;
> extern EFI_COMPONENT_NAME2_PROTOCOL gComponentName2;
> +extern EFI_DRIVER_BINDING_PROTOCOL mDriverBinding;
>
> EFI_STATUS
> CreateDwUsbHc (
> diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/ComponentName.c b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/ComponentName.c
> index 2f3c53323bf1..8639ab7d39c5 100644
> --- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/ComponentName.c
> +++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/ComponentName.c
> @@ -1,5 +1,6 @@
> /** @file
> *
> + * Copyright (c) 2020, ARM Limited. All rights reserved.
> * Copyright (c) 2018, Andrey Warkentin <andrey.warkentin@gmail.com>
> *
> * SPDX-License-Identifier: BSD-2-Clause-Patent
> @@ -205,10 +206,27 @@ ComponentNameGetControllerName (
> OUT CHAR16 **ControllerName
> )
> {
> + EFI_STATUS Status;
> +
> + //
> + // This is a device driver, so ChildHandle must be NULL.
> + //
> if (ChildHandle != NULL) {
> return EFI_UNSUPPORTED;
> }
>
> + //
> + // Make sure this driver is currently managing ControllHandle
Shouldn't it be 'ControllerHandle' rather than 'ControllHandle'?
> + //
> + Status = EfiTestManagedDevice (
> + ControllerHandle,
> + mDriverBinding.DriverBindingHandle,
> + &gEfiUsb2HcProtocolGuid
> + );
> + if (EFI_ERROR (Status)) {
> + return Status;
> + }
> +
> return LookupUnicodeString2 (
> Language,
> This->SupportedLanguages,
> diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c
> index 7f78179d4c06..bada13a6cd7c 100644
> --- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c
> +++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DriverBinding.c
> @@ -36,7 +36,7 @@ DriverStop (
> IN EFI_HANDLE *ChildHandleBuffer
> );
>
> -STATIC EFI_DRIVER_BINDING_PROTOCOL mDriverBinding = {
> +EFI_DRIVER_BINDING_PROTOCOL mDriverBinding = {
> DriverSupported,
> DriverStart,
> DriverStop,
>
Reviewed-by: Pete Batard <pete@akeo.ie>
next prev parent reply other threads:[~2020-08-17 11:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-15 20:26 [edk2-platform][PATCH v1 0/3] Platforms/RaspberryPi: Fix ComponentName2 SCT errors Samer El-Haj-Mahmoud
2020-08-15 20:26 ` [edk2-platform][PATCH v1 1/3] Platforms/RaspberryPi: Fix DisplayDxe ComponentName2 error checking Samer El-Haj-Mahmoud
2020-08-17 11:17 ` Pete Batard
2020-08-17 13:54 ` Ard Biesheuvel
2020-08-17 13:58 ` [edk2-devel] " Samer El-Haj-Mahmoud
2020-08-15 20:26 ` [edk2-platform][PATCH v1 2/3] Platforms/RaspberryPi: Fix DwUsbHostDxe " Samer El-Haj-Mahmoud
2020-08-17 11:17 ` Pete Batard [this message]
2020-08-15 20:26 ` [edk2-platform][PATCH v1 3/3] Platforms/RaspberryPi: Fix BcmGenetDxe " Samer El-Haj-Mahmoud
2020-08-17 11:17 ` Pete Batard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab857d11-c1b0-0273-2077-0724342729cc@akeo.ie \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox