[edk2-devel] [PATCH V2 6/6] RedfishPkg/RedfishRestExDxe: Update Supported function

Chang, Abner via groups.io posted 6 patches 2 years, 1 month ago
[edk2-devel] [PATCH V2 6/6] RedfishPkg/RedfishRestExDxe: Update Supported function
Posted by Chang, Abner via groups.io 2 years, 1 month ago
From: Abner Chang <abner.chang@amd.com>

Update Supported function to check it the given
controller handle is already started.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c
index 39221989c49..741a8c1e938 100644
--- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c
+++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c
@@ -357,6 +357,21 @@ RedfishRestExDriverBindingSupported (
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL
   )
 {
+  EFI_STATUS  Status;
+  UINT32      *Id;
+
+  Status = gBS->OpenProtocol (
+                  ControllerHandle,
+                  &gEfiCallerIdGuid,
+                  (VOID **)&Id,
+                  This->DriverBindingHandle,
+                  ControllerHandle,
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL
+                  );
+  if (!EFI_ERROR (Status)) {
+    return EFI_ALREADY_STARTED;
+  }
+
   //
   // Test for the HttpServiceBinding Protocol.
   //
-- 
2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113333): https://edk2.groups.io/g/devel/message/113333
Mute This Topic: https://groups.io/mt/103577253/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 6/6] RedfishPkg/RedfishRestExDxe: Update Supported function
Posted by Nickle Wang via groups.io 2 years, 1 month ago

Reviewed-by: Nickle Wang <nicklew@nvidia.com>

Regards,
Nickle

> -----Original Message-----
> From: abner.chang@amd.com <abner.chang@amd.com>
> Sent: Sunday, January 7, 2024 9:27 PM
> To: devel@edk2.groups.io
> Cc: Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>
> Subject: [PATCH V2 6/6] RedfishPkg/RedfishRestExDxe: Update Supported
> function
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> Update Supported function to check it the given
> controller handle is already started.
> 
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c
> b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c
> index 39221989c49..741a8c1e938 100644
> --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c
> +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c
> @@ -357,6 +357,21 @@ RedfishRestExDriverBindingSupported (
>    IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL
>    )
>  {
> +  EFI_STATUS  Status;
> +  UINT32      *Id;
> +
> +  Status = gBS->OpenProtocol (
> +                  ControllerHandle,
> +                  &gEfiCallerIdGuid,
> +                  (VOID **)&Id,
> +                  This->DriverBindingHandle,
> +                  ControllerHandle,
> +                  EFI_OPEN_PROTOCOL_GET_PROTOCOL
> +                  );
> +  if (!EFI_ERROR (Status)) {
> +    return EFI_ALREADY_STARTED;
> +  }
> +
>    //
>    // Test for the HttpServiceBinding Protocol.
>    //
> --
> 2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113397): https://edk2.groups.io/g/devel/message/113397
Mute This Topic: https://groups.io/mt/103577253/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-