]> git.proxmox.com Git - mirror_edk2.git/commitdiff
RedfishPkg/RedfishDiscoverDxe: USB Redfish host interface is not supported
authorAbner Chang <abner.chang@amd.com>
Mon, 15 Aug 2022 01:47:30 +0000 (09:47 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 23 Aug 2022 03:13:11 +0000 (03:13 +0000)
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>
RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c

index d79750baaf30186d12ef147e1adacaf3ab499209..88cec1f416939205a4013dd6d17666dcec73ba3e 100644 (file)
@@ -65,10 +65,15 @@ RedfishGetHostInterfaceProtocolData (
         RecordTmp       = (UINT8 *)Record + Offset;\r
 \r
         //\r
-        // Check Device Type, only PCI/PCIe Network Interface v2 is supported now.\r
+        // Check Device Type, PCI/PCIe and USB Network Interface v2 is supported.\r
         //\r
-        if (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {\r
-          ASSERT (SpecificDataLen == sizeof (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);\r
+        if ((*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {\r
+          if (*RecordTmp == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {\r
+            ASSERT (SpecificDataLen == sizeof (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);\r
+          } else {\r
+            ASSERT (SpecificDataLen > sizeof (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);\r
+          }\r
+\r
           *DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;\r
           Offset            = Offset + SpecificDataLen;\r
           RecordTmp         = (UINT8 *)Record + Offset;\r