<!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.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=477074910-11022009><FONT face=Arial color=#0000ff
size=2>Applied on 1942.</FONT></SPAN></DIV>
<DIV><SPAN class=477074910-11022009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=477074910-11022009><FONT face=Arial color=#0000ff size=2>With
Fabs comment.</FONT></SPAN></DIV>
<DIV><SPAN class=477074910-11022009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=477074910-11022009><FONT face=Arial color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=477074910-11022009><FONT face=Arial color=#0000ff
size=2>Tzachi</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>Tzachi
Dar<BR><B>Sent:</B> Monday, February 09, 2009 7:04 PM<BR><B>To:</B>
ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] PATCH: [hw] Don't try to
write to event log when there is nodriver object.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN class=175470217-09022009>The following
checkin prevents blue screens that were found when running with the driver
verifier.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Index:
Q:/projinf2/trunk/hw/mlx4/kernel/bus/core/l2w_debug.c<BR>===================================================================<BR>---
Q:/projinf2/trunk/hw/mlx4/kernel/bus/core/l2w_debug.c (revision
3931)<BR>+++
Q:/projinf2/trunk/hw/mlx4/kernel/bus/core/l2w_debug.c (revision
3932)<BR>@@ -45,6 +45,11 @@<BR> int l_PktSize
=sizeof(IO_ERROR_LOG_PACKET)+pi_nDataItems*sizeof(ULONG);<BR> int
l_TotalSize =l_PktSize +l_Size;<BR> <BR>+ if (pi_pIoObject == NULL)
{<BR>+ ASSERT(FALSE);<BR>+ return;<BR>+ }<BR>+<BR> /*
Init the variable argument list */
<BR> va_start(l_Argptr, pi_nDataItems);<BR> <BR>@@ -132,6
+137,13 @@<BR> // print to Debugger<BR> va_start(list,
format);<BR> buf[MAX_BUFFER_SIZE - 1] = '\0';<BR>+<BR>+ if
(mdev == NULL)
{<BR>+ ASSERT(FALSE);<BR>+ return;<BR>+ }<BR>+<BR>+ <BR> if
(RtlStringCbVPrintfA( (char*)buf, sizeof(buf), format,
list))<BR> return;<BR> cl_dbg_out( "%s\n",
(char*)buf );<BR>@@ -177,6 +189,11
@@<BR> UCHAR buf[MAX_BUFFER_SIZE];<BR> WCHAR wbuf[MAX_BUFFER_SIZE];<BR> <BR>+ if
(mdev == NULL)
{<BR>+ ASSERT(FALSE);<BR>+ return;<BR>+ }<BR>+<BR> //
print to Debugger<BR> va_start(list,
format);<BR> buf[MAX_BUFFER_SIZE - 1] = '\0';<BR>Index:
Q:/projinf2/trunk/hw/mlx4/kernel/inc/l2w.h<BR>===================================================================<BR>---
Q:/projinf2/trunk/hw/mlx4/kernel/inc/l2w.h (revision 3931)<BR>+++
Q:/projinf2/trunk/hw/mlx4/kernel/inc/l2w.h (revision 3932)<BR>@@ -326,6
+326,9 @@<BR> <BR> static inline int mlx4_is_livefish(struct
mlx4_dev *dev)<BR> {<BR>+ if (dev == NULL) {<BR>+ return
TRUE;<BR>+ }<BR> return !!(dev->flags &
MLX4_FLAG_LIVEFISH);<BR> }<BR> <BR>Index:
Q:/projinf2/trunk/hw/mlx4/kernel/hca/drv.h<BR>===================================================================<BR>---
Q:/projinf2/trunk/hw/mlx4/kernel/hca/drv.h (revision 3931)<BR>+++
Q:/projinf2/trunk/hw/mlx4/kernel/hca/drv.h (revision 3932)<BR>@@ -243,6
+243,9 @@<BR> <BR> static inline boolean_t
hca_is_livefish(PFDO_DEVICE_DATA p_fdo)<BR> {<BR>+ if (p_fdo ==
NULL) {<BR>+ return TRUE;<BR>+ }<BR> return
p_fdo->bus_ib_ifc.is_livefish;<BR> }<BR> <BR>Index:
Q:/projinf2/trunk/hw/mthca/kernel/hca_debug.h<BR>===================================================================<BR>---
Q:/projinf2/trunk/hw/mthca/kernel/hca_debug.h (revision 3931)<BR>+++
Q:/projinf2/trunk/hw/mthca/kernel/hca_debug.h (revision 3932)<BR>@@ -63,7
+63,11 @@<BR> }<BR> <BR> #define
HCA_PRINT_EV_MDEV(_level_,_flag_,_msg_)
\<BR>- HCA_PRINT_TO_EVENT_LOG(mdev->ext->cl_ext.p_self_do,_level_,_flag_,_msg_)<BR>+{\<BR>+ if(mdev)
{\<BR>+ HCA_PRINT_TO_EVENT_LOG(mdev->ext->cl_ext.p_self_do,_level_,_flag_,_msg_)\<BR>+ }\<BR>+}\<BR> <BR> <BR> #if
defined(EVENT_TRACING)<BR>Index:
Q:/projinf2/trunk/hw/mthca/kernel/mthca_log.c<BR>===================================================================<BR>---
Q:/projinf2/trunk/hw/mthca/kernel/mthca_log.c (revision 3931)<BR>+++
Q:/projinf2/trunk/hw/mthca/kernel/mthca_log.c (revision 3932)<BR>@@ -73,6
+73,10 @@<BR> /* Init the variable argument list */
<BR> va_start(l_Argptr,
pi_nDataItems);<BR> <BR>+ if(pi_pIoObject == NULL)
{<BR>+ return;<BR>+ }<BR>+ <BR> /* Allocate an
error log entry */ <BR> l_pErrorLogEntry =
<BR> (PIO_ERROR_LOG_PACKET)IoAllocateErrorLogEntry(<BR>@@ -165,6
+169,10 @@<BR> int l_PktSize
=sizeof(IO_ERROR_LOG_PACKET)+pi_nDataItems*sizeof(ULONG);<BR> int
l_TotalSize =l_PktSize +l_Size;<BR> <BR>+ if(pi_pIoObject == NULL)
{<BR>+ return;<BR>+ }<BR>+ <BR> /* Init the
variable argument list */ <BR> va_start(l_Argptr,
pi_nDataItems);<BR> <BR>Index:
Q:/projinf2/trunk/hw/mthca/kernel/mthca_dev.h<BR>===================================================================<BR>---
Q:/projinf2/trunk/hw/mthca/kernel/mthca_dev.h (revision 3931)<BR>+++
Q:/projinf2/trunk/hw/mthca/kernel/mthca_dev.h (revision 3932)<BR>@@
-598,6 +598,9 @@<BR> <BR> static inline int mthca_is_livefish(struct
mthca_dev *mdev)<BR> {<BR>+ if(mdev == NULL)
{<BR>+ return TRUE;<BR>+ }<BR> return
mdev->mthca_flags &
MTHCA_FLAG_LIVEFISH;<BR> }<BR> <BR></DIV></BLOCKQUOTE></FONT></BODY></HTML>