[MLX4] 1) added support for sending large multi-parameter messages to System Event...
[mirror/winof/.git] / hw / mlx4 / kernel / bus / drv / drv.c
index f88b2d1..a4ca954 100644 (file)
@@ -430,6 +430,8 @@ EvtDeviceD0Entry(
        PFDO_DEVICE_DATA p_fdo  = FdoGetData(Device);\r
        struct pci_dev *pdev    = &p_fdo->pci_dev;\r
        struct mlx4_dev *mdev;\r
+       struct ib_device_attr props;\r
+       struct ib_device *p_ibdev;\r
 \r
        MLX4_ENTER(MLX4_DBG_DRV);\r
 \r
@@ -450,7 +452,7 @@ EvtDeviceD0Entry(
                }\r
 \r
        // Log Success Message\r
-       MLX4_PRINT_EV(TRACE_LEVEL_INFORMATION ,MLX4_DBG_DRV ,\r
+       MLX4_PRINT(TRACE_LEVEL_INFORMATION ,MLX4_DBG_DRV ,\r
                ("Ven %x Dev %d Fw %d.%d.%d, IsBurnDevice %s\n", \r
                (unsigned)pdev->ven_id, (unsigned)pdev->dev_id,\r
                (int) (mdev->caps.fw_ver >> 32),\r
@@ -458,6 +460,24 @@ EvtDeviceD0Entry(
                (int) (mdev->caps.fw_ver & 0xffff),\r
                mlx4_is_livefish(mdev) ? "Y" : "N"\r
                ));\r
+       if (!mlx4_is_livefish(mdev)) {\r
+               memset ( &props, 0, sizeof( props) );\r
+               p_ibdev = pdev->ib_dev;\r
+               (p_ibdev->query_device)( p_ibdev, &props );\r
+               WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_INFO_DEV_STARTED, 0, 0, 11,\r
+                       L"%04x", (ULONG)pdev->ven_id, \r
+                       L"%04x", (ULONG)pdev->dev_id,\r
+                       L"%04x", (ULONG)pdev->sub_vendor_id,\r
+                       L"%04x", (ULONG)pdev->sub_system_id,\r
+                       L"%02x", (ULONG)pdev->revision_id,\r
+                       L"%d", (int) (mdev->caps.fw_ver >> 32),\r
+                       L"%d", (int) (mdev->caps.fw_ver >> 16) & 0xffff, \r
+                       L"%d", (int) (mdev->caps.fw_ver & 0xffff),\r
+                       L"%08x", *(PULONG)((PUCHAR)&p_ibdev->node_guid + 0), \r
+                       L"%08x", *(PULONG)((PUCHAR)&p_ibdev->node_guid + 4), \r
+                       L"%s", pdev->location\r
+                       ); \r
+       }\r
 \r
 err:\r
        MLX4_EXIT( MLX4_DBG_DRV );\r
@@ -728,6 +748,7 @@ __get_resources(
        pdev->dev_id = pdev->pci_cfg_space.DeviceID;\r
        pdev->sub_vendor_id = pdev->pci_cfg_space.u.type0.SubVendorID;\r
        pdev->sub_system_id = pdev->pci_cfg_space.u.type0.SubSystemID;\r
+       pdev->revision_id = pdev->pci_cfg_space.RevisionID;\r
        pdev->p_self_do = WdfDeviceWdmGetDeviceObject(p_fdo->FdoDevice);\r
        pdev->pdo = WdfDeviceWdmGetPhysicalDevice(p_fdo->FdoDevice);\r
        \r