<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5512" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=449093914-17112009><FONT face=Arial color=#0000ff
size=2>Applied in 2584.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Leonid
Keller<BR><B>Sent:</B> Monday, November 16, 2009 10:46 AM<BR><B>To:</B>
ofw_list<BR><B>Subject:</B> [ofw][patch][MLX4] added events for Registry
handling error flow<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Index:
V:/svn/winib/trunk/hw/mlx4/kernel/bus/core/ev_log.mc<BR>===================================================================<BR>---
V:/svn/winib/trunk/hw/mlx4/kernel/bus/core/ev_log.mc (revision
5057)<BR>+++
V:/svn/winib/trunk/hw/mlx4/kernel/bus/core/ev_log.mc (revision
5058)<BR>@@ -75,7 +75,10 @@<BR> HW
revision %t%6%n<BR> FW
version %t%7.%8.%9%n<BR> HCA
guid %t%10%11%n<BR>- HCA
location %t'%12'<BR>+ HCA location
%t'%12'%n<BR>+ port number
%t%13%n<BR>+ port1 type
%t%14%n<BR>+ port2 type
%t%15.<BR> .<BR> <BR> MessageId=0x0007 Facility=MLX4
Severity=Error SymbolicName=EVENT_MLX4_ERROR_MAP_FA<BR>@@ -142,5 +145,14
@@<BR> HCA restart finished. Notifying the clients
...<BR> .<BR> <BR>+MessageId=0x0010 Facility=MLX4 Severity=Warning
SymbolicName=EVENT_MLX4_WARN_REG_ACTION<BR>+Language=English<BR>+%2 failed on
%3 with status %4.<BR>+.<BR> <BR>+MessageId=0x0011 Facility=MLX4
Severity=Warning
SymbolicName=EVENT_MLX4_WARN_REG_OPEN_DEV_KEY<BR>+Language=English<BR>+WdfDeviceOpenRegistryKey
failed on opening SW (=driver) key for mlx4_bus with status
%2.<BR>+.<BR> <BR>+<BR>Index:
V:/svn/winib/trunk/hw/mlx4/kernel/bus/drv/drv.c<BR>===================================================================<BR>---
V:/svn/winib/trunk/hw/mlx4/kernel/bus/drv/drv.c (revision 5057)<BR>+++
V:/svn/winib/trunk/hw/mlx4/kernel/bus/drv/drv.c (revision 5058)<BR>@@
-275,7 +275,7 @@<BR> return
status;<BR> }<BR> <BR>-BOOLEAN __read_setup_params(PUNICODE_STRING
puvalue)<BR>+BOOLEAN __read_setup_params(struct pci_dev *pdev, PUNICODE_STRING
puvalue)<BR> {<BR> NTSTATUS
status; <BR> WDFKEY hParamsKey = NULL;<BR>@@
-287,6 +287,8 @@<BR> {<BR> MLX4_PRINT(
TRACE_LEVEL_WARNING ,MLX4_DBG_DEV
,<BR> ("WdfRegistryOpenKey(<A
href="file://\\Registry\\Machine\\SOFTWARE\\Mellanox">\\Registry\\Machine\\SOFTWARE\\Mellanox</A>)
Failed status = 0x%x\n", status));<BR>+ WriteEventLogEntryData(
pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0,
3,<BR>+ L"%s", L"WdfRegistryOpenKey", L"%s", KeyName.Buffer,
L"%#x", status );<BR> return
FALSE;<BR> }<BR> <BR>@@ -295,6 +297,8
@@<BR> {<BR> MLX4_PRINT( TRACE_LEVEL_ERROR
,MLX4_DBG_DEV
,<BR> ("WdfRegistryQueryUnicodeString(PortType) Failed
status = 0x%x\n", status));<BR>+ WriteEventLogEntryData(
pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0,
3,<BR>+ L"%s", L"WdfRegistryQueryUnicodeString", L"%s",
PortType.Buffer, L"%#x", status
);<BR> WdfRegistryClose(hParamsKey);<BR> return
FALSE;<BR> }<BR>@@ -310,6 +314,8 @@<BR> WDFKEY hKey =
NULL;<BR> WDFKEY hParamsKey = NULL;<BR> BOOLEAN bRet =
FALSE;<BR>+ PFDO_DEVICE_DATA p_fdo =
FdoGetData(Device);<BR>+ struct pci_dev *pdev =
&p_fdo->pci_dev;<BR> DECLARE_CONST_UNICODE_STRING(Parameters,
L"Parameters");<BR> DECLARE_CONST_UNICODE_STRING(PortType,
L"PortType");<BR> <BR>@@ -329,21 +335,27 @@<BR> if(
!NT_SUCCESS( status ) ) {<BR> MLX4_PRINT(
TRACE_LEVEL_ERROR ,MLX4_DBG_DEV
,<BR> ("WdfDeviceOpenRegistryKey(<A
href="file://\\Registry\\Machine\\Control\\Class\\">\\Registry\\Machine\\Control\\Class\\</A>...)
Failed status = 0x%x\n", status));<BR>+ WriteEventLogEntryData(
pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_OPEN_DEV_KEY, 0, 0,
1,<BR>+ L"%#x", status );<BR> goto
err;<BR> }<BR> <BR> status =
WdfRegistryOpenKey(hKey, &Parameters, STANDARD_RIGHTS_ALL,
WDF_NO_OBJECT_ATTRIBUTES, &hParamsKey);<BR> if( !NT_SUCCESS(
status ) ) {<BR> MLX4_PRINT( TRACE_LEVEL_ERROR
,MLX4_DBG_DEV ,("WdfRegistryOpenKey(Prameters) Failed status = 0x%x\n",
status));<BR>+ WriteEventLogEntryData( pdev->p_self_do,
(ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0, 3,<BR>+ L"%s",
L"WdfRegistryOpenKey", L"%s", Parameters.Buffer, L"%#x", status
);<BR> goto err;<BR> }<BR> <BR>- bRet =
__read_setup_params(&uvalue);<BR>+ bRet = __read_setup_params(pdev,
&uvalue);<BR> if (bRet ==
TRUE)<BR> {<BR> status =
WdfRegistryAssignValue(hParamsKey, &PortType,
REG_SZ,uvalue.Length,uvalue.Buffer);
<BR> if( !NT_SUCCESS( status ) )
{<BR> MLX4_PRINT( TRACE_LEVEL_ERROR
,MLX4_DBG_DEV ,("WdfRegistryAssignValue(PortType) Failed status =
0x%x\n", status));<BR>+ WriteEventLogEntryData(
pdev->p_self_do, (ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0,
3,<BR>+ L"%s", L"WdfRegistryAssignValue", L"%s",
PortType.Buffer, L"%#x", status );<BR> goto
err;<BR> }<BR> uvalue.Length = 0;<BR>@@
-368,6 +380,10 @@<BR> dev_params->mod_port_type[1] =
MLX4_PORT_TYPE_ETH;<BR> }<BR> }<BR>+ else
{<BR>+ WriteEventLogEntryData( pdev->p_self_do,
(ULONG)EVENT_MLX4_WARN_REG_ACTION, 0, 0, 3,<BR>+ L"%s",
L"WdfRegistryQueryUnicodeString", L"%s", PortType.Buffer, L"%#x", status
);<BR>+ }<BR> <BR> err:<BR> if (hKey != NULL) <BR>@@
-523,7 +539,7 @@<BR> memset ( &props, 0, sizeof( props)
);<BR> p_ibdev =
pdev->ib_dev;<BR> (p_ibdev->query_device)( p_ibdev,
&props );<BR>- WriteEventLogEntryData( pdev->p_self_do,
(ULONG)EVENT_MLX4_INFO_DEV_STARTED, 0, 0,
11,<BR>+ WriteEventLogEntryData( pdev->p_self_do,
(ULONG)EVENT_MLX4_INFO_DEV_STARTED, 0, 0,
14,<BR> L"%04x", (ULONG)pdev->ven_id,
<BR> L"%04x",
(ULONG)pdev->dev_id,<BR> L"%04x",
(ULONG)pdev->sub_vendor_id,<BR>@@ -534,7 +550,10
@@<BR> L"%d", (int) (mdev->caps.fw_ver &
0xffff),<BR> L"%08x",
*(PULONG)((PUCHAR)&p_ibdev->node_guid + 0),
<BR> L"%08x",
*(PULONG)((PUCHAR)&p_ibdev->node_guid + 4),
<BR>- L"%s", pdev->location<BR>+ L"%s",
pdev->location,<BR>+ L"%d",
mdev->caps.num_ports,<BR>+ L"%s",
mdev->caps.port_type[1] == MLX4_PORT_TYPE_IB ? L"IB" :
L"ETH",<BR>+ L"%s", mdev->caps.port_type[2] ==
MLX4_PORT_TYPE_IB ? L"IB" : L"ETH"<BR> );
<BR> }<BR> <BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>