summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c11
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;