return status;\r
}\r
\r
-BOOLEAN __read_setup_params(PUNICODE_STRING puvalue)\r
+BOOLEAN __read_setup_params(struct pci_dev *pdev, PUNICODE_STRING puvalue)\r
{\r
NTSTATUS status; \r
WDFKEY hParamsKey = NULL;\r
{\r
MLX4_PRINT( TRACE_LEVEL_WARNING ,MLX4_DBG_DEV ,\r
("WdfRegistryOpenKey(\\Registry\\Machine\\SOFTWARE\\Mellanox) Failed status = 0x%x\n", status));\r
+ WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0, 3,\r
+ L"%s", L"WdfRegistryOpenKey", L"%s", KeyName.Buffer, L"%#x", status );\r
return FALSE;\r
}\r
\r
{\r
MLX4_PRINT( TRACE_LEVEL_ERROR ,MLX4_DBG_DEV ,\r
("WdfRegistryQueryUnicodeString(PortType) Failed status = 0x%x\n", status));\r
+ WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0, 3,\r
+ L"%s", L"WdfRegistryQueryUnicodeString", L"%s", PortType.Buffer, L"%#x", status );\r
WdfRegistryClose(hParamsKey);\r
return FALSE;\r
}\r
WDFKEY hKey = NULL;\r
WDFKEY hParamsKey = NULL;\r
BOOLEAN bRet = FALSE;\r
+ PFDO_DEVICE_DATA p_fdo = FdoGetData(Device);\r
+ struct pci_dev *pdev = &p_fdo->pci_dev;\r
DECLARE_CONST_UNICODE_STRING(Parameters, L"Parameters");\r
DECLARE_CONST_UNICODE_STRING(PortType, L"PortType");\r
\r
if( !NT_SUCCESS( status ) ) {\r
MLX4_PRINT( TRACE_LEVEL_ERROR ,MLX4_DBG_DEV ,\r
("WdfDeviceOpenRegistryKey(\\Registry\\Machine\\Control\\Class\\...) Failed status = 0x%x\n", status));\r
+ WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_OPEN_DEV_KEY, 0, 0, 1,\r
+ L"%#x", status );\r
goto err;\r
}\r
\r
status = WdfRegistryOpenKey(hKey, &Parameters, STANDARD_RIGHTS_ALL, WDF_NO_OBJECT_ATTRIBUTES, &hParamsKey);\r
if( !NT_SUCCESS( status ) ) {\r
MLX4_PRINT( TRACE_LEVEL_ERROR ,MLX4_DBG_DEV ,("WdfRegistryOpenKey(Prameters) Failed status = 0x%x\n", status));\r
+ WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0, 3,\r
+ L"%s", L"WdfRegistryOpenKey", L"%s", Parameters.Buffer, L"%#x", status );\r
goto err;\r
}\r
\r
- bRet = __read_setup_params(&uvalue);\r
+ bRet = __read_setup_params(pdev, &uvalue);\r
if (bRet == TRUE)\r
{\r
status = WdfRegistryAssignValue(hParamsKey, &PortType, REG_SZ,uvalue.Length,uvalue.Buffer); \r
if( !NT_SUCCESS( status ) ) {\r
MLX4_PRINT( TRACE_LEVEL_ERROR ,MLX4_DBG_DEV ,("WdfRegistryAssignValue(PortType) Failed status = 0x%x\n", status));\r
+ WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0, 3,\r
+ L"%s", L"WdfRegistryAssignValue", L"%s", PortType.Buffer, L"%#x", status );\r
goto err;\r
}\r
uvalue.Length = 0;\r
L"%s",uvalue_data); \r
}\r
}\r
+ else {\r
+ WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0, 3,\r
+ L"%s", L"WdfRegistryQueryUnicodeString", L"%s", PortType.Buffer, L"%#x", status );\r
+ }\r
\r
err:\r
if (hKey != NULL) \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
+ WriteEventLogEntryData( pdev->p_self_do, (ULONG)EVENT_MLX4_INFO_DEV_STARTED, 0, 0, 14,\r
L"%04x", (ULONG)pdev->ven_id, \r
L"%04x", (ULONG)pdev->dev_id,\r
L"%04x", (ULONG)pdev->sub_vendor_id,\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
+ L"%s", pdev->location,\r
+ L"%d", mdev->caps.num_ports,\r
+ L"%s", mdev->caps.port_type[1] == MLX4_PORT_TYPE_IB ? L"IB" : L"ETH",\r
+ L"%s", mdev->caps.port_type[2] == MLX4_PORT_TYPE_IB ? L"IB" : L"ETH"\r
); \r
}\r
\r