<!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.16640" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=359543616-07102008>This patch prevents 
BSOD caused by WHQL reliability tests</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=359543616-07102008>signed-off by: 
Alexander Naslednikov (xalex at mellanox.co.il)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=359543616-07102008>                    
Tzachi Dar (tzachid at mellanox.co.il)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2>Index: 
core/bus/kernel/bus_iou_mgr.c<BR>===================================================================<BR>--- 
core/bus/kernel/bus_iou_mgr.c (revision 3218)<BR>+++ 
core/bus/kernel/bus_iou_mgr.c (working copy)<BR>@@ -1583,6 +1583,7 
@@<BR>   p_ext = 
p_dev_obj->DeviceExtension;<BR>   if( !p_ext->h_ca 
||<BR>    !p_ext->b_present 
||<BR>+   !p_ext->h_ca->obj.p_ci_ca->verbs.p_hca_dev 
||<BR>    p_ext->b_reported_missing 
)<BR>   {<BR>    return 
STATUS_NO_SUCH_DEVICE;<BR>Index: 
core/bus/kernel/bus_port_mgr.c<BR>===================================================================<BR>--- 
core/bus/kernel/bus_port_mgr.c (revision 3218)<BR>+++ 
core/bus/kernel/bus_port_mgr.c (working copy)<BR>@@ -1206,7 +1206,6 
@@<BR>   */<BR>  p_ext = 
p_ctx->p_pdo_ext;<BR>  CL_ASSERT( p_ext 
);<BR>- CL_ASSERT(p_bfi == 
p_ext->p_parent_ext->bus_filter);<BR> <BR>  /*<BR>   
* Flag the port PDO as no longer being present.  We have to wait 
until<BR>@@ -1220,7 +1219,8 @@<BR>       ("%s 
NULL h_ca? p_ext %p\n", p_bfi->whoami, p_ext ) 
);<BR>   return;<BR>  }<BR>-<BR>+ CL_ASSERT(p_bfi 
== 
p_ext->p_parent_ext->bus_filter);<BR>+ <BR>  cl_mutex_acquire( 
&gp_port_mgr->pdo_mutex );<BR>  CL_ASSERT( p_ext->h_ca 
);<BR> <BR>@@ -1846,7 +1846,10 @@<BR>  CL_ASSERT( 
KeGetCurrentIrql() < DISPATCH_LEVEL );<BR> <BR>  p_ext = 
p_dev_obj->DeviceExtension;<BR>-<BR>+ if 
 (p_ext->pdo.b_hibernating) {<BR>+  // Can't continue within 
hibernation stage<BR>+  return 
STATUS_UNSUCCESSFUL;<BR>+ }<BR>  BUS_TRACE( BUS_DBG_PNP, ("Query 
i/f for %s: PDO %p (=%p),ext %p, present %d, missing %d 
.\n",<BR>   p_ext->pdo.cl_ext.vfptr_pnp_po->identity, 
p_ext->pdo.cl_ext.p_self_do, <BR>   p_dev_obj, p_ext, 
p_ext->pdo.b_present, p_ext->pdo.b_reported_missing ) );<BR>@@ -1948,6 
+1951,7 @@<BR>   p_ext = 
p_dev_obj->DeviceExtension;<BR>   if( !p_ext->h_ca 
||<BR>    !p_ext->b_present 
||<BR>+   !p_ext->h_ca->obj.p_ci_ca->verbs.p_hca_dev 
||<BR>    p_ext->b_reported_missing 
)<BR>   {<BR>    return 
STATUS_NO_SUCH_DEVICE;<BR>Index: 
hw/mlx4/kernel/hca/drv.c<BR>===================================================================<BR>--- 
hw/mlx4/kernel/hca/drv.c (revision 3218)<BR>+++ 
hw/mlx4/kernel/hca/drv.c (working copy)<BR>@@ -295,6 +295,7 
@@<BR>  setup_ci_interface( p_fdo->hca.guid, 
!!hca_is_livefish(p_fdo), pIfc );<BR> <BR>  pIfc->p_hca_dev = 
WdfDeviceWdmGetPhysicalDevice(p_fdo->FdoDevice);<BR>+ ASSERT(pIfc->p_hca_dev);<BR>  pIfc->vend_id 
= (uint32_t)p_fdo->bus_ib_ifc.pdev->ven_id;<BR>  pIfc->dev_id 

(uint16_t)p_fdo->bus_ib_ifc.pdev->dev_id;<BR>  pIfc->dev_revision 
= (uint16_t)p_fdo->hca.hw_ver;<BR>@@ -1443,6 +1444,7 
@@<BR>  setup_ci_interface( p_fdo->hca.guid, 
!!hca_is_livefish(p_fdo), pIfc );<BR> <BR>  pIfc->p_hca_dev = 
p_fdo->cl_ext.p_pdo;<BR>+ ASSERT(pIfc->p_hca_dev);    
<BR>  pIfc->vend_id = 
(uint32_t)p_fdo->bus_ib_ifc.pdev->ven_id;<BR>  pIfc->dev_id = 
(uint16_t)p_fdo->bus_ib_ifc.pdev->dev_id;<BR>  pIfc->dev_revision 
= (uint16_t)p_fdo->hca.hw_ver;<BR>@@ -2111,6 +2113,7 
@@<BR>  p_ifc->InterfaceHeader.InterfaceDereference = 
__hca_noop;<BR>  p_ifc->Verbs = 
*p_hca_ifc;<BR>  p_ifc->Verbs.p_hca_dev = 
&p_fdo->hca;<BR>+ ASSERT(p_ifc->Verbs.p_hca_dev);    
<BR> <BR>  ExFreePool( p_hca_ifc );<BR>  status = 
STATUS_SUCCESS;</FONT></DIV></BODY></HTML>