[edk2-devel] [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported

Igor Kulchytskyy via groups.io posted 1 patch 1 year, 8 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
[edk2-devel] [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported
Posted by Igor Kulchytskyy via groups.io 1 year, 8 months ago
Host Interface details are discribed by the SMBIOS Type 42 table.
The table is published by the RedfishHostInterfaceDxe driver.
That driver supports PCI-E and USB host interface types.
The table is consumed by the RedfishGetHostInterfaceProtocolData function in the RedfishDiscoverDxe driver.
That function only supports PCI-E interface.


Cc: Abner Chang <Abner.Chang@amd.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Signed-off-by: Igor Kulchytskyy <igork@ami.com>
---
 RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
index d79750b..a3b977f 100644
--- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
+++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
@@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData (
         RecordTmp       = (UINT8 *)Record + Offset;

         //
-        // Check Device Type, only PCI/PCIe Network Interface v2 is supported now.
+        // Check Device Type, PCI/PCIe and USB Network Interface v2 is supported.
         //
-        if (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
-          ASSERT (SpecificDataLen == sizeof (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
+        if ((*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {
+          if (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2){
+              ASSERT (SpecificDataLen == sizeof (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
+          }
+          if (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2){
+              ASSERT (SpecificDataLen > sizeof (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
+          }
           *DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
           Offset            = Offset + SpecificDataLen;
           RecordTmp         = (UINT8 *)Record + Offset;
--
2.6.1.windows.1
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92181): https://edk2.groups.io/g/devel/message/92181
Mute This Topic: https://groups.io/mt/92816627/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported
Posted by Chang, Abner via groups.io 1 year, 8 months ago
[AMD Official Use Only - General]

Hi Igor, my feedback is inline.

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com>
> Sent: Sunday, August 7, 2022 8:26 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; nickle.wang@hpe.com; Igor
> Kulchytskyy <igork@ami.com>
> Subject: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is
> not supported
> 
> [CAUTION: External Email]
> 
> Host Interface details are discribed by the SMBIOS Type 42 table.
> The table is published by the RedfishHostInterfaceDxe driver.
> That driver supports PCI-E and USB host interface types.
> The table is consumed by the RedfishGetHostInterfaceProtocolData function in
> the RedfishDiscoverDxe driver.
> That function only supports PCI-E interface.
> 
> 
> Cc: Abner Chang <Abner.Chang@amd.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11 ++++++++--
> -
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> index d79750b..a3b977f 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> @@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData (
>          RecordTmp       = (UINT8 *)Record + Offset;
> 
>          //
> -        // Check Device Type, only PCI/PCIe Network Interface v2 is supported
> now.
> +        // Check Device Type, PCI/PCIe and USB Network Interface v2 is supported.
>          //
> -        if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
> -          ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +        if ((*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {
> +          if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2){
> +              ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +          }
> +          if (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2){
[Chang, Abner] 
We can do if-else here because we only support two types of network device now.
Abner

> +              ASSERT (SpecificDataLen > sizeof
> (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
> +          }
>            *DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
>            Offset            = Offset + SpecificDataLen;
>            RecordTmp         = (UINT8 *)Record + Offset;
> --
> 2.6.1.windows.1
> -The information contained in this message may be confidential and proprietary
> to American Megatrends (AMI). This communication is intended to be read only
> by the individual or entity to whom it is addressed or by their designee. If the
> reader of this message is not the intended recipient, you are on notice that any
> distribution of this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and then
> delete or destroy all copies of the transmission.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92238): https://edk2.groups.io/g/devel/message/92238
Mute This Topic: https://groups.io/mt/92816627/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported
Posted by Igor Kulchytskyy via groups.io 1 year, 8 months ago
Hi Abner,
Thank you for your feedback.
I agree with you.
What should I do to change it?
Should I create a new patch?
Thank you,
Igor

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Tuesday, August 09, 2022 3:35 AM
To: Igor Kulchytskyy <igork@ami.com>; devel@edk2.groups.io
Cc: nickle.wang@hpe.com
Subject: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported


**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**

[AMD Official Use Only - General]

Hi Igor, my feedback is inline.

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com>
> Sent: Sunday, August 7, 2022 8:26 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; nickle.wang@hpe.com; Igor
> Kulchytskyy <igork@ami.com>
> Subject: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host
> interface is not supported
>
> [CAUTION: External Email]
>
> Host Interface details are discribed by the SMBIOS Type 42 table.
> The table is published by the RedfishHostInterfaceDxe driver.
> That driver supports PCI-E and USB host interface types.
> The table is consumed by the RedfishGetHostInterfaceProtocolData
> function in the RedfishDiscoverDxe driver.
> That function only supports PCI-E interface.
>
>
> Cc: Abner Chang <Abner.Chang@amd.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11
> ++++++++--
> -
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git
> a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> index d79750b..a3b977f 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> @@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData (
>          RecordTmp       = (UINT8 *)Record + Offset;
>
>          //
> -        // Check Device Type, only PCI/PCIe Network Interface v2 is supported
> now.
> +        // Check Device Type, PCI/PCIe and USB Network Interface v2 is supported.
>          //
> -        if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
> -          ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +        if ((*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {
> +          if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2){
> +              ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +          }
> +          if (*RecordTmp ==
> + REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2){
[Chang, Abner]
We can do if-else here because we only support two types of network device now.
Abner

> +              ASSERT (SpecificDataLen > sizeof
> (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
> +          }
>            *DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
>            Offset            = Offset + SpecificDataLen;
>            RecordTmp         = (UINT8 *)Record + Offset;
> --
> 2.6.1.windows.1
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is
> intended to be read only by the individual or entity to whom it is
> addressed or by their designee. If the reader of this message is not
> the intended recipient, you are on notice that any distribution of
> this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92257): https://edk2.groups.io/g/devel/message/92257
Mute This Topic: https://groups.io/mt/92816627/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported
Posted by Chang, Abner via groups.io 1 year, 8 months ago
Yes, please create the new patch set with the prefix [PATCH V2]. Also, use git move to move Redfish.h to Include\ to keep the commit history, this one could be the patch 3.

Thank you,
Abner

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Igor Kulchytskyy <igork@ami.com>
Sent: Wednesday, August 10, 2022 3:21:46 AM
To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: nickle.wang@hpe.com <nickle.wang@hpe.com>
Subject: RE: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported

[CAUTION: External Email]

Hi Abner,
Thank you for your feedback.
I agree with you.
What should I do to change it?
Should I create a new patch?
Thank you,
Igor

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Tuesday, August 09, 2022 3:35 AM
To: Igor Kulchytskyy <igork@ami.com>; devel@edk2.groups.io
Cc: nickle.wang@hpe.com
Subject: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported


**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**

[AMD Official Use Only - General]

Hi Igor, my feedback is inline.

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com>
> Sent: Sunday, August 7, 2022 8:26 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; nickle.wang@hpe.com; Igor
> Kulchytskyy <igork@ami.com>
> Subject: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host
> interface is not supported
>
> [CAUTION: External Email]
>
> Host Interface details are discribed by the SMBIOS Type 42 table.
> The table is published by the RedfishHostInterfaceDxe driver.
> That driver supports PCI-E and USB host interface types.
> The table is consumed by the RedfishGetHostInterfaceProtocolData
> function in the RedfishDiscoverDxe driver.
> That function only supports PCI-E interface.
>
>
> Cc: Abner Chang <Abner.Chang@amd.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11
> ++++++++--
> -
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git
> a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> index d79750b..a3b977f 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> @@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData (
>          RecordTmp       = (UINT8 *)Record + Offset;
>
>          //
> -        // Check Device Type, only PCI/PCIe Network Interface v2 is supported
> now.
> +        // Check Device Type, PCI/PCIe and USB Network Interface v2 is supported.
>          //
> -        if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
> -          ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +        if ((*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {
> +          if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2){
> +              ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +          }
> +          if (*RecordTmp ==
> + REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2){
[Chang, Abner]
We can do if-else here because we only support two types of network device now.
Abner

> +              ASSERT (SpecificDataLen > sizeof
> (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
> +          }
>            *DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
>            Offset            = Offset + SpecificDataLen;
>            RecordTmp         = (UINT8 *)Record + Offset;
> --
> 2.6.1.windows.1
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is
> intended to be read only by the individual or entity to whom it is
> addressed or by their designee. If the reader of this message is not
> the intended recipient, you are on notice that any distribution of
> this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.


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


Re: [edk2-devel] [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported
Posted by Chang, Abner via groups.io 1 year, 8 months ago
[AMD Official Use Only - General]

Hi Igor, you sent two patches or three? Seems I only got two patches.
If you missed the third one, then please resend it with the prefix  [PATCH V2 RESEND].  And please also have the numbered patch such as 1/3, 2/3 and 3/3, you can have the numbered patch using git format-patch *without* --no-numbered assigned.
That's fine if you will send the 3rd one separately, I will review these two first.

Thanks
Abner



From: Chang, Abner <Abner.Chang@amd.com>
Sent: Wednesday, August 10, 2022 8:05 AM
To: Igor Kulchytskyy <igork@ami.com>; devel@edk2.groups.io
Cc: nickle.wang@hpe.com
Subject: Re: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported

Yes, please create the new patch set with the prefix [PATCH V2]. Also, use git move to move Redfish.h to Include\ to keep the commit history, this one could be the patch 3.

Thank you,
Abner

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
Sent: Wednesday, August 10, 2022 3:21:46 AM
To: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: nickle.wang@hpe.com<mailto:nickle.wang@hpe.com> <nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>>
Subject: RE: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported

[CAUTION: External Email]

Hi Abner,
Thank you for your feedback.
I agree with you.
What should I do to change it?
Should I create a new patch?
Thank you,
Igor

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Sent: Tuesday, August 09, 2022 3:35 AM
To: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>
Subject: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported


**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**

[AMD Official Use Only - General]

Hi Igor, my feedback is inline.

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
> Sent: Sunday, August 7, 2022 8:26 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>; nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>; Igor
> Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
> Subject: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host
> interface is not supported
>
> [CAUTION: External Email]
>
> Host Interface details are discribed by the SMBIOS Type 42 table.
> The table is published by the RedfishHostInterfaceDxe driver.
> That driver supports PCI-E and USB host interface types.
> The table is consumed by the RedfishGetHostInterfaceProtocolData
> function in the RedfishDiscoverDxe driver.
> That function only supports PCI-E interface.
>
>
> Cc: Abner Chang <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Cc: Nickle Wang <nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>>
> Signed-off-by: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11
> ++++++++--
> -
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git
> a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> index d79750b..a3b977f 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> @@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData (
>          RecordTmp       = (UINT8 *)Record + Offset;
>
>          //
> -        // Check Device Type, only PCI/PCIe Network Interface v2 is supported
> now.
> +        // Check Device Type, PCI/PCIe and USB Network Interface v2 is supported.
>          //
> -        if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
> -          ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +        if ((*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {
> +          if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2){
> +              ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +          }
> +          if (*RecordTmp ==
> + REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2){
[Chang, Abner]
We can do if-else here because we only support two types of network device now.
Abner

> +              ASSERT (SpecificDataLen > sizeof
> (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
> +          }
>            *DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
>            Offset            = Offset + SpecificDataLen;
>            RecordTmp         = (UINT8 *)Record + Offset;
> --
> 2.6.1.windows.1
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is
> intended to be read only by the individual or entity to whom it is
> addressed or by their designee. If the reader of this message is not
> the intended recipient, you are on notice that any distribution of
> this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.


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


Re: [edk2-devel] [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported
Posted by Igor Kulchytskyy via groups.io 1 year, 8 months ago
Hi Abner,
I had the issues when I tried to check third patch with PatchCheck.py.
And I've only fixed them and sent it now.
Thank you,
Igor


From: Chang, Abner <Abner.Chang@amd.com>
Sent: Wednesday, August 10, 2022 8:33 PM
To: Igor Kulchytskyy <igork@ami.com>; devel@edk2.groups.io
Cc: nickle.wang@hpe.com
Subject: RE: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported


[AMD Official Use Only - General]

Hi Igor, you sent two patches or three? Seems I only got two patches.
If you missed the third one, then please resend it with the prefix  [PATCH V2 RESEND].  And please also have the numbered patch such as 1/3, 2/3 and 3/3, you can have the numbered patch using git format-patch *without* --no-numbered assigned.
That's fine if you will send the 3rd one separately, I will review these two first.

Thanks
Abner



From: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Sent: Wednesday, August 10, 2022 8:05 AM
To: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>
Subject: Re: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported

Yes, please create the new patch set with the prefix [PATCH V2]. Also, use git move to move Redfish.h to Include\ to keep the commit history, this one could be the patch 3.

Thank you,
Abner

Get Outlook for Android<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2FAAb9ysg&data=05%7C01%7Cigork%40ami.com%7Caa646953e00d44b4910108da7b310870%7C27e97857e15f486cb58e86c2b3040f93%7C1%7C0%7C637957747794890482%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VCriNNrm4Vi2h1tRuMtgC8IqZ%2FdrhKaWFKeesElczLI%3D&reserved=0>
________________________________
From: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
Sent: Wednesday, August 10, 2022 3:21:46 AM
To: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: nickle.wang@hpe.com<mailto:nickle.wang@hpe.com> <nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>>
Subject: RE: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported

[CAUTION: External Email]

Hi Abner,
Thank you for your feedback.
I agree with you.
What should I do to change it?
Should I create a new patch?
Thank you,
Igor

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Sent: Tuesday, August 09, 2022 3:35 AM
To: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>
Subject: [EXTERNAL] RE: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported


**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**

[AMD Official Use Only - General]

Hi Igor, my feedback is inline.

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
> Sent: Sunday, August 7, 2022 8:26 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>; nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>; Igor
> Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
> Subject: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host
> interface is not supported
>
> [CAUTION: External Email]
>
> Host Interface details are discribed by the SMBIOS Type 42 table.
> The table is published by the RedfishHostInterfaceDxe driver.
> That driver supports PCI-E and USB host interface types.
> The table is consumed by the RedfishGetHostInterfaceProtocolData
> function in the RedfishDiscoverDxe driver.
> That function only supports PCI-E interface.
>
>
> Cc: Abner Chang <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Cc: Nickle Wang <nickle.wang@hpe.com<mailto:nickle.wang@hpe.com>>
> Signed-off-by: Igor Kulchytskyy <igork@ami.com<mailto:igork@ami.com>>
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11
> ++++++++--
> -
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git
> a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> index d79750b..a3b977f 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> @@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData (
>          RecordTmp       = (UINT8 *)Record + Offset;
>
>          //
> -        // Check Device Type, only PCI/PCIe Network Interface v2 is supported
> now.
> +        // Check Device Type, PCI/PCIe and USB Network Interface v2 is supported.
>          //
> -        if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
> -          ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +        if ((*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {
> +          if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2){
> +              ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +          }
> +          if (*RecordTmp ==
> + REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2){
[Chang, Abner]
We can do if-else here because we only support two types of network device now.
Abner

> +              ASSERT (SpecificDataLen > sizeof
> (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
> +          }
>            *DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
>            Offset            = Offset + SpecificDataLen;
>            RecordTmp         = (UINT8 *)Record + Offset;
> --
> 2.6.1.windows.1
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is
> intended to be read only by the individual or entity to whom it is
> addressed or by their designee. If the reader of this message is not
> the intended recipient, you are on notice that any distribution of
> this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.


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