public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Igor Kulchytskyy" <igork@ami.com>
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: [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported
Date: Tue, 9 Aug 2022 19:21:46 +0000	[thread overview]
Message-ID: <BLAPR10MB51853E3A17F9C3BF325689E0A8629@BLAPR10MB5185.namprd10.prod.outlook.com> (raw)
In-Reply-To: <MN2PR12MB3966EBFF7158AFAC54094D0BEA629@MN2PR12MB3966.namprd12.prod.outlook.com>

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.

  reply	other threads:[~2022-08-09 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-07 12:25 [PATCH] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported Igor Kulchytskyy
2022-08-09  7:34 ` Chang, Abner
2022-08-09 19:21   ` Igor Kulchytskyy [this message]
2022-08-10  0:05     ` Chang, Abner
2022-08-11  0:32       ` Chang, Abner
2022-08-11  3:27         ` Igor Kulchytskyy
  -- strict thread matches above, loose matches on Subject: below --
2022-08-04 15:25 Igor Kulchytskyy
2022-08-05 16:31 ` Chang, Abner

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=BLAPR10MB51853E3A17F9C3BF325689E0A8629@BLAPR10MB5185.namprd10.prod.outlook.com \
    --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