diff options
author | Abner Chang <abner.chang@amd.com> | 2022-08-15 09:47:30 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-08-23 03:13:11 +0000 |
commit | 938430741f71949eeed0d93a43f9e597c65759f4 (patch) | |
tree | aa6bbb7353a0d7fb3ff916dec0af206c99838f54 /RedfishPkg | |
parent | c15c9fa4200f6819952a902283a0abcc81146a3a (diff) | |
download | edk2-938430741f71949eeed0d93a43f9e597c65759f4.tar.gz |
RedfishPkg/RedfishDiscoverDxe: USB Redfish host interface is not supported
Host Interface details are described 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 edfishGetHostInterfaceProtocolData
function in the RedfishDiscoverDxe driver. The function only supports
PCI-E host interface type.
Cc: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Signed-off-by: Igor Kulchytskyy <igork@ami.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
Diffstat (limited to 'RedfishPkg')
-rw-r--r-- | RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c index d79750baaf..88cec1f416 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);
+ } else {
+ ASSERT (SpecificDataLen > sizeof (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
+ }
+
*DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
Offset = Offset + SpecificDataLen;
RecordTmp = (UINT8 *)Record + Offset;
|