<!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><FONT face=Arial size=2>Index: 
mlx4/kernel/bus/drv/pdo.c<BR>===================================================================<BR>--- 
mlx4/kernel/bus/drv/pdo.c (revision 1993)<BR>+++ 
mlx4/kernel/bus/drv/pdo.c (working copy)<BR>@@ -268,6 +268,7 
@@<BR>  p_fdo->bus_ib_ifc.mlx4_interface.mlx4_unregister_ev_cb = 
mlx4_reset_cb_unregister;<BR>  p_fdo->bus_ib_ifc.mlx4_interface.mlx4_reset_request 

mlx4_reset_request;<BR>  p_fdo->bus_ib_ifc.mlx4_interface.mlx4_reset_execute 

mlx4_reset_execute;<BR>+ p_fdo->bus_ib_ifc.mlx4_interface.mlx4_reset_ready 
= mlx4_reset_ready;<BR>  <BR>  //<BR>  // Create a 
custom interface so that other drivers can<BR>Index: 
mlx4/kernel/bus/inc/bus_intf.h<BR>===================================================================<BR>--- 
mlx4/kernel/bus/inc/bus_intf.h (revision 1993)<BR>+++ 
mlx4/kernel/bus/inc/bus_intf.h (working copy)<BR>@@ -117,6 +117,7 
@@<BR> <BR> typedef int (*MLX4_RESET_REQUEST) (struct ib_event_handler 
*event_handler);<BR> typedef int (*MLX4_RESET_EXECUTE) (struct 
ib_event_handler *event_handler);<BR>+typedef int (*MLX4_RESET_READY) (struct 
ib_event_handler *event_handler);<BR> <BR> struct mlx4_interface_ex 
{<BR>  MLX4_PD_ALLOC       
mlx4_pd_alloc;<BR>@@ -169,6 +170,7 
@@<BR>  MLX4_UNREGISTER_EVENT_HANDLER 
mlx4_unregister_ev_cb;<BR>  MLX4_RESET_REQUEST 
mlx4_reset_request;<BR>  MLX4_RESET_EXECUTE 
mlx4_reset_execute;<BR>+ MLX4_RESET_READY 
mlx4_reset_ready;<BR>  <BR> };<BR> <BR>Index: 
mlx4/kernel/bus/inc/device.h<BR>===================================================================<BR>--- 
mlx4/kernel/bus/inc/device.h (revision 1993)<BR>+++ 
mlx4/kernel/bus/inc/device.h (working copy)<BR>@@ -40,8 +40,7 
@@<BR>  MLX4_FLAG_RESET_CLIENT  = 1 << 
11,<BR>  MLX4_FLAG_RESET_DRIVER = 1 << 
12,<BR>  MLX4_FLAG_RESET_STARTED = 1 << 
13,<BR>- MLX4_FLAG_CARD_IS_DEAD = 1 << 
14,<BR>- MLX4_FLAG_BUSY_WAIT  = 1 << 
15<BR>+ MLX4_FLAG_BUSY_WAIT  = 1 << 
14<BR> };<BR> <BR> enum {<BR>@@ -342,6 +341,7 
@@<BR>  u32   signature;<BR>  struct 
pci_dev        *pdev;<BR>  unsigned 
long  flags;<BR>+ LONG                
reset_pending;<BR>  struct mlx4_caps caps;<BR>  struct 
radix_tree_root qp_table_tree;<BR>  u32   rev_id;<BR>Index: 
mlx4/kernel/bus/inc/ib_verbs.h<BR>===================================================================<BR>--- 
mlx4/kernel/bus/inc/ib_verbs.h (revision 1993)<BR>+++ 
mlx4/kernel/bus/inc/ib_verbs.h (working copy)<BR>@@ -293,15 +293,19 
@@<BR> };<BR> <BR> enum ib_event_handler_flags 
{<BR>- IB_IVH_RESET_CB  = (1 << 
0),<BR>- IB_IVH_NOTIFIED  = (1 << 
1),<BR>- IB_IVH_RESET_READY  = (1 << 
2)<BR>+ IB_IVH_RESET_CB   = (1 << 0), // it is 
handler for soft reset<BR>+ IB_IVH_NOTIFIED   = (1 << 
1), // client has been notified about requested reset 
<BR>+ IB_IVH_RESET_READY  = (1 << 2), // client is 
ready for HW reset<BR>+ IB_IVH_RESET_D_PENDING = (1 << 
3), // device reset notification is pending 
<BR>+ IB_IVH_RESET_C_PENDING = (1 << 4), // client reset 
notification is pending <BR>+ IB_IVH_NOTIF_READY  = (1 << 
5) // client is ready to get reset request 
notification<BR> };<BR> <BR>+typedef void (*ib_event_handler_t)(struct 
ib_event_handler *, struct ib_event *);<BR> <BR> struct 
ib_event_handler {<BR>  struct ib_device 
*device;<BR>- void            
(*handler)(struct ib_event_handler *, struct ib_event 
*);<BR>+ ib_event_handler_t handler;<BR>  struct list_head  
list;<BR>  void 
*            
ctx;<BR>  void 
*            
rsrv_ptr;<BR>Index: 
mlx4/kernel/bus/net/catas.c<BR>===================================================================<BR>--- 
mlx4/kernel/bus/net/catas.c (revision 1993)<BR>+++ 
mlx4/kernel/bus/net/catas.c (working copy)<BR>@@ -39,10 +39,6 
@@<BR> static DEFINE_SPINLOCK(catas_lock);<BR> static 
LIST_HEAD(catas_list);<BR> <BR>-// TODO: put into Globals<BR>-// "Reset 
device on internal errors if non-zero (default 1)")<BR>-int g_internal_err_reset 
= 0;<BR>-<BR> void mlx4_dispatch_reset_event(struct ib_device *ibdev, enum 
ib_event_type type)<BR> {<BR>  unsigned long flags;<BR>@@ -56,11 
+52,25 @@<BR> <BR>  list_for_each_entry(handler, 
&ibdev->event_handler_list, list, struct 
ib_event_handler)<BR>  {<BR>-  // notify only those, that 
are not notified<BR>+  // notify only soft reset 
handlers<BR>   if ( handler->flags & IB_IVH_RESET_CB 
)<BR>+   // notify only those, that are not yet 
notified<BR>    if ( !(handler->flags & 
IB_IVH_NOTIFIED) ) {<BR>-    handler->flags |= 
IB_IVH_NOTIFIED;<BR>-    handler->handler(handler, 
&event);<BR>+    // notify only those that are ready to 
get the notification<BR>+    if ( handler->flags & 
IB_IVH_NOTIF_READY ) {<BR>+     // insure not to notify 
once more <BR>+     handler->flags |= 
IB_IVH_NOTIFIED;<BR>+     handler->flags &= 
~(IB_IVH_NOTIF_READY | 
<BR>+      IB_IVH_RESET_D_PENDING | 
IB_IVH_RESET_C_PENDING);<BR>+     handler->handler(handler, 
&event);<BR>+    }<BR>+    else 
{<BR>+     // pend the 
notification<BR>+     if (type == 
IB_EVENT_RESET_DRIVER) 
<BR>+      handler->flags |= 
IB_IVH_RESET_D_PENDING;<BR>+     else 
<BR>+      handler->flags |= 
IB_IVH_RESET_C_PENDING;<BR>+    }<BR>    }<BR>  }<BR> <BR>@@ 
-107,36 +117,28 @@<BR>     i, 
swab32(readl(priv->catas_err.map + i)));<BR> }<BR> <BR>-static void 
catas_reset()<BR>-{<BR>- struct mlx4_priv *priv, *tmppriv;<BR>- struct 
mlx4_dev *dev;<BR>- struct list_head tlist;<BR>- int 
ret;<BR>-<BR>- INIT_LIST_HEAD(&tlist);<BR>- spin_lock_irq(&catas_lock);<BR>- list_splice_init(&catas_list, 
&tlist);<BR>- spin_unlock_irq(&catas_lock);<BR>-<BR>- list_for_each_entry_safe(priv, 
tmppriv, &tlist, catas_err.list, struct mlx4_priv, struct mlx4_priv) 
{<BR>-  ret = mlx4_restart_one(priv->dev.pdev);<BR>-  dev 
= &priv->dev;<BR>-  if 
(ret)<BR>-   mlx4_err(dev, "Reset failed (%d)\n", 
ret);<BR>-  else<BR>-   mlx4_dbg(dev, "Reset 
succeeded\n");<BR>- }<BR>-}<BR>-<BR> static 
void<BR> catas_reset_wi(<BR>  IN    DEVICE_OBJECT*    p_dev_obj,<BR>- IN    void*      context 
)<BR>+ IN    struct mlx4_dev *   dev 
)<BR> {<BR>+ NTSTATUS status;<BR>+ long 
do_reset;<BR>  UNUSED_PARAM(p_dev_obj);<BR>- IoFreeWorkItem( 
context );<BR>- catas_reset();<BR>+<BR>+ do_reset = 
InterlockedCompareExchange(&dev->reset_pending, 1, 0);<BR>+ if 
(do_reset == 0) {<BR>+  status = mlx4_reset(dev);<BR>+  if ( 
!NT_SUCCESS( status ) ) {<BR>+   mlx4_err(dev, "Failed to reset 
HCA, aborting.(status %#x)\n", 
status);<BR>+  }<BR>+  <BR>+  dev->flags |= 
MLX4_FLAG_RESET_DRIVER; // bar the 
device<BR>+ }<BR>+<BR>+ dump_err_buf(dev);<BR>+ mlx4_dispatch_event(dev, 
MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR, 0, 
0);<BR>+ mlx4_dispatch_reset_event(dev->pdev->ib_dev, 
IB_EVENT_RESET_DRIVER);<BR> }<BR> <BR> /* polling on 
DISPATCH_LEVEL */<BR>@@ -145,27 +147,9 @@<BR>  struct mlx4_priv *priv 
= mlx4_priv(dev);<BR> <BR>  if (readl(priv->catas_err.map)) 
{<BR>-  dump_err_buf(dev);<BR>-<BR>-  // bar the 
device<BR>-  dev->flags |= 
MLX4_FLAG_RESET_DRIVER;<BR>-<BR>-  // relay the 
event<BR>-  mlx4_dispatch_event(dev, 
MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR, 0, 0);<BR>-<BR>-  // notify the 
clients<BR>-  mlx4_dispatch_reset_event(dev->pdev->ib_dev, 
IB_EVENT_RESET_DRIVER);<BR>-<BR>-  if (g_internal_err_reset) 
{<BR>-   PIO_WORKITEM catas_work = IoAllocateWorkItem( 
dev->pdev->p_self_do 
);<BR>-<BR>-   spin_lock_dpc(&catas_lock);<BR>-   list_add(&priv->catas_err.list, 
&catas_list);<BR>-   spin_unlock_dpc(&catas_lock);<BR>-<BR>-   if 
(!catas_work)<BR>-    IoQueueWorkItem( catas_work, 
catas_reset_wi, DelayedWorkQueue, catas_work 
);<BR>-  }<BR>+  <BR>+  mlx4_warn(dev, "Detected 
catastrophic error on mdev %p\n", dev);<BR>+  IoQueueWorkItem( 
priv->catas_err.catas_work, catas_reset_wi, DelayedWorkQueue, dev 
);<BR>  } else 
{<BR>   spin_lock_dpc(&catas_lock);<BR>   if 
(!priv->catas_err.stop) {<BR>@@ -190,12 +174,12 @@<BR>  poll_catas( 
dev );<BR> }<BR> <BR>-void mlx4_start_catas_poll(struct mlx4_dev 
*dev)<BR>+int mlx4_start_catas_poll(struct mlx4_dev 
*dev)<BR> {<BR>  struct mlx4_priv *priv = 
mlx4_priv(dev);<BR>  u64 addr;<BR>+ int 
err;<BR> <BR>- INIT_LIST_HEAD(&priv->catas_err.list);<BR>  priv->catas_err.map 
= NULL;<BR> <BR>  addr = pci_resource_start(dev->pdev, 
priv->fw.catas_bar) +<BR>@@ -205,8 +189,16 @@<BR>  if 
(!priv->catas_err.map) {<BR>   mlx4_warn(dev, "Failed to map 
internal error buffer at 0x%lx\n",<BR>      
addr);<BR>-  return;<BR>+  err = 
-ENOMEM;<BR>+  goto 
err_map;<BR>  }<BR>+ <BR>+ priv->catas_err.catas_work = 
IoAllocateWorkItem( dev->pdev->p_self_do );<BR>+ if 
(!priv->catas_err.catas_work) {<BR>+  mlx4_warn(dev, "Failed to 
allocate work item from polling thread\n");<BR>+  err = 
-EFAULT;<BR>+  goto 
err_alloc;<BR>+ }<BR> <BR>  priv->catas_err.stop = 
0;<BR>  spin_lock_init( &catas_lock );<BR>@@ -215,6 +207,13 
@@<BR>  priv->catas_err.interval.QuadPart  = (-10)* 
(__int64)MLX4_CATAS_POLL_INTERVAL;<BR>  KeSetTimerEx( 
&priv->catas_err.timer, priv->catas_err.interval, 
<BR>   0, &priv->catas_err.timer_dpc );<BR>+ return 
0;<BR>+<BR>+<BR>+err_alloc:<BR>+ iounmap(priv->catas_err.map, 
priv->fw.catas_size * 4);<BR>+err_map:<BR>+ return 
err;<BR> }<BR> <BR> void mlx4_stop_catas_poll(struct mlx4_dev 
*dev)<BR>@@ -231,13 +230,11 
@@<BR> <BR>  KeCancelTimer(&priv->catas_err.timer);<BR>  KeFlushQueuedDpcs();<BR>-<BR>  if 
(priv->catas_err.map)<BR>   iounmap(priv->catas_err.map, 
priv->fw.catas_size * 
4);<BR> <BR>- spin_lock_irq(&catas_lock);<BR>- list_del(&priv->catas_err.list);<BR>- spin_unlock_irq(&catas_lock);<BR>+ if 
(priv->catas_err.catas_work) <BR>+  IoFreeWorkItem( 
priv->catas_err.catas_work );<BR> }<BR> <BR> static int 
wait4reset(struct ib_event_handler *event_handler)<BR>@@ -264,6 +261,24 
@@<BR>  return n_not_ready;<BR> }<BR> <BR>+int 
mlx4_reset_ready( struct ib_event_handler *event_handler 
)<BR>+{<BR>+ unsigned long flags;<BR>+ struct ib_device *ibdev = 
event_handler->device;<BR>+<BR>+ ASSERT(KeGetCurrentIrql() == 
PASSIVE_LEVEL);<BR>+ <BR>+ spin_lock_irqsave(&ibdev->event_handler_lock, 
&flags);<BR>+ event_handler->flags |= 
IB_IVH_NOTIF_READY;<BR>+ spin_unlock_irqrestore(&ibdev->event_handler_lock, 
flags);<BR>+ if (event_handler->flags & 
IB_IVH_RESET_D_PENDING)<BR>+  mlx4_dispatch_reset_event(ibdev, 
IB_EVENT_RESET_DRIVER);<BR>+ else<BR>+ if (event_handler->flags 
& IB_IVH_RESET_C_PENDING)<BR>+  mlx4_dispatch_reset_event(ibdev, 
IB_EVENT_RESET_CLIENT);<BR>+ return 0;<BR>+}<BR>+<BR> int 
mlx4_reset_execute( struct ib_event_handler *event_handler 
)<BR> {<BR>  int err;<BR>@@ -274,8 +289,9 
@@<BR>  struct pci_dev *pdev = 
ibdev->dma_device->pdev;<BR> <BR>  // mark client as "ready 
for reset" and check whether we can do reset<BR>- if 
(wait4reset(event_handler))<BR>+ if (wait4reset(event_handler)) 
{<BR>   return 0;<BR>+ }<BR> <BR>  // fully 
bar the device<BR>  ibdev->dma_device->flags |= 
MLX4_FLAG_RESET_STARTED;<BR>@@ -330,16 +346,21 @@<BR>  struct 
ib_device *ibdev;<BR>  struct mlx4_dev 
*dev;<BR> <BR>-    ibdev = 
event_handler->device;<BR>-    if (ibdev == 
NULL)<BR>-        return 
-EFAULT;<BR>+ unsigned long flags;<BR> <BR>-    dev = 
ibdev->dma_device;<BR>-    if (ibdev == 
NULL)<BR>-        return 
-EFAULT;<BR>+ ibdev = event_handler->device;<BR>+ if (ibdev == 
NULL)<BR>+  return -EFAULT;<BR>+<BR>+ dev = 
ibdev->dma_device;<BR>+ if (ibdev == NULL)<BR>+  return 
-EFAULT;<BR>+<BR>+ spin_lock_irqsave(&ibdev->event_handler_lock, 
&flags);<BR>+<BR>         
<BR>  // set device to RESET_PENDING mode<BR>- if 
(!mlx4_is_barred(dev)) {<BR>+ if (!(dev->flags & 
(MLX4_FLAG_RESET_CLIENT | MLX4_FLAG_RESET_DRIVER))) 
{<BR>   PIO_WORKITEM 
reset_work;<BR> <BR>   // bar the device<BR>@@ -348,12 
+369,17 @@<BR>   // delay reset to a system 
thread<BR>   // to allow for end of operations that are in 
progress<BR>   reset_work = IoAllocateWorkItem( 
dev->pdev->p_self_do );<BR>-  if 
(!reset_work)<BR>+  if (!reset_work) 
{<BR>+   mlx4_err(dev, "mlx4_reset_request IoAllocateWorkItem 
failed, reset will not be propagated\n");<BR>    return 
-EFAULT;<BR>+  }<BR>   event_handler->rsrv_ptr = 
reset_work;<BR>   IoQueueWorkItem( reset_work, card_reset_wi, 
DelayedWorkQueue, event_handler 
);<BR>  }<BR> <BR>+ spin_unlock_irqrestore(&ibdev->event_handler_lock, 
flags);<BR>+<BR>+<BR>  return 0;<BR> }<BR> <BR>Index: 
mlx4/kernel/bus/net/cmd.c<BR>===================================================================<BR>--- 
mlx4/kernel/bus/net/cmd.c (revision 1993)<BR>+++ 
mlx4/kernel/bus/net/cmd.c (working copy)<BR>@@ -210,6 +210,7 
@@<BR>  int err = 0;<BR>  u64 end;<BR>  u8 
status;<BR>+ long 
do_reset;<BR> <BR>  down(&priv->cmd.poll_sem);<BR> <BR>@@ 
-224,6 +225,19 @@<BR> <BR>  if (cmd_pending(dev)) 
{<BR>   err = -ETIMEDOUT;<BR>+<BR>+ do_reset = 
InterlockedCompareExchange(&dev->reset_pending, 1, 0);<BR>+ if 
(!do_reset) {<BR>+  NTSTATUS status1;<BR>+  status1 = 
mlx4_reset(dev);<BR>+  if ( !NT_SUCCESS( status1 ) ) 
{<BR>+   mlx4_err(dev, "Failed to reset HCA, aborting.(status 
%#x)\n", 
status1);<BR>+  }<BR>+  <BR>+  dev->flags |= 
MLX4_FLAG_RESET_DRIVER; // bar the 
device<BR>+ }<BR>+ mlx4_dispatch_reset_event(dev->pdev->ib_dev, 
IB_EVENT_RESET_DRIVER);<BR>+  <BR>   goto 
out;<BR>  }<BR> <BR>@@ -273,15 +287,14 @@<BR>  struct 
mlx4_cmd_context *context;<BR>  int err = 0;<BR>  u64 
out_prm = out_param ? *out_param : 0;<BR>+ long 
do_reset;<BR> <BR>  down(&cmd->event_sem);<BR>-<BR>- if 
( dev->flags & MLX4_FLAG_CARD_IS_DEAD ) {<BR>+ if ( dev->flags 
& MLX4_FLAG_RESET_DRIVER ) {<BR>   err = 
-EBUSY;<BR>   mlx4_warn(dev, "mlx4_cmd_wait: Command %02x is 
skipped because the card is stuck \n", op);<BR>   goto 
exit;<BR>  }<BR>-<BR>  spin_lock(&cmd->context_lock);<BR>  BUG_ON(cmd->free_head 
< 0);<BR>  context = &cmd->context[cmd->free_head];<BR>@@ 
-302,8 +315,6 @@<BR>    mlx4_err(dev, "mlx4_cmd_wait: 
Command %02x completed with timeout after %d msecs 
\n",<BR>       op, 
timeout);<BR> <BR>-   /* for debug purposes 
*/<BR>-   ASSERT(FALSE);<BR>    /* for 
enabling busy-wait loop, add MLX4_FLAG_BUSY_WAIT (0x8000) to dev->flags 
*/<BR>    while (dev) {<BR>     u32 
wait_ms =2000; /* wait interval in msecs */<BR>@@ -311,10 +322,20 
@@<BR>      break;<BR>     cl_thread_suspend( 
wait_ms ); <BR>    }<BR>+   do_reset = 
InterlockedCompareExchange(&dev->reset_pending, 1, 
0);<BR>+   if (!do_reset) {<BR>+    NTSTATUS 
status = mlx4_reset(dev);<BR>+    if ( !NT_SUCCESS( status ) 
) {<BR>+     mlx4_err(dev, "Failed to reset HCA, 
aborting.(status %#x)\n", 
status);<BR>+    }<BR>+    <BR>+    dev->flags 
|= MLX4_FLAG_RESET_DRIVER; // bar the 
device<BR>+   }<BR> <BR>    /* try to 
solve the problem */<BR>-   dev->flags |= 
MLX4_FLAG_RESET_DRIVER | 
MLX4_FLAG_CARD_IS_DEAD;<BR>-   mlx4_dispatch_reset_event(dev->pdev->ib_dev, 
IB_EVENT_RESET_DRIVER);<BR>+   if (dev->pdev->ib_dev) 
{<BR>+    mlx4_dispatch_reset_event(dev->pdev->ib_dev, 
IB_EVENT_RESET_DRIVER);<BR>+   }<BR>   }<BR>  }<BR> <BR>@@ 
-331,7 +352,7 @@<BR>  cmd->free_head = (int)(context - 
cmd->context);<BR>  spin_unlock(&cmd->context_lock);<BR> <BR>-exit:<BR>+exit: <BR>  up(&cmd->event_sem);<BR>  return 
err;<BR> }<BR>@@ -420,8 +441,8 @@<BR>   out_is_imm, 
in_modifier, (int)op_modifier);<BR> #endif<BR> <BR>- if ( 
mlx4_is_barred(dev) )<BR>-  return -EFAULT;<BR>+  if ( 
mlx4_is_barred(dev) )<BR>+   return 
-EFAULT;<BR>  <BR>  if 
(mlx4_priv(dev)->cmd.use_events)<BR>   return 
mlx4_cmd_wait(dev, in_param, out_param, out_is_imm,<BR>Index: 
mlx4/kernel/bus/net/cq.c<BR>===================================================================<BR>--- 
mlx4/kernel/bus/net/cq.c (revision 1993)<BR>+++ 
mlx4/kernel/bus/net/cq.c (working copy)<BR>@@ -258,8 +258,7 
@@<BR> <BR>  if 
(atomic_dec_and_test(&cq->refcount))<BR>   complete(&cq->free);<BR>- if 
(!mlx4_is_barred(dev))<BR>-  wait_for_completion(&cq->free);<BR>+ wait_for_completion(&cq->free);<BR> <BR>  mlx4_table_put(dev, 
&cq_table->table, 
cq->cqn);<BR>  mlx4_bitmap_free(&cq_table->bitmap, 
cq->cqn);<BR>Index: 
mlx4/kernel/bus/net/intf.c<BR>===================================================================<BR>--- 
mlx4/kernel/bus/net/intf.c (revision 1993)<BR>+++ 
mlx4/kernel/bus/net/intf.c (working copy)<BR>@@ -119,20 +119,21 
@@<BR>  struct mlx4_priv *priv = mlx4_priv(dev);<BR>  struct 
mlx4_device_context 
*dev_ctx;<BR> <BR>- spin_lock_dpc(&priv->ctx_lock);<BR>+ spin_lock(&priv->ctx_lock);<BR> <BR>  list_for_each_entry(dev_ctx, 
&priv->ctx_list, list, struct 
mlx4_device_context)<BR>   if 
(dev_ctx->intf->event)<BR>    dev_ctx->intf->event(dev, 
dev_ctx->context, 
type,<BR>           subtype, 
port);<BR> <BR>- spin_unlock_dpc(&priv->ctx_lock);<BR>+ spin_unlock(&priv->ctx_lock);<BR> }<BR> <BR> int 
mlx4_register_device(struct mlx4_dev *dev)<BR> {<BR>  struct 
mlx4_priv *priv = mlx4_priv(dev);<BR>  struct mlx4_interface 
*intf;<BR>+ int err = 
0;<BR> <BR>  mutex_lock(&intf_mutex);<BR> <BR>@@ -142,9 
+143,9 
@@<BR> <BR>  mutex_unlock(&intf_mutex);<BR>  if 
(!mlx4_is_livefish(dev))<BR>-  mlx4_start_catas_poll(dev);<BR>+  err 
= mlx4_start_catas_poll(dev);<BR> <BR>- return 0;<BR>+ return 
err;<BR> }<BR> <BR> void mlx4_unregister_device(struct mlx4_dev 
*dev)<BR>Index: 
mlx4/kernel/bus/net/mlx4.h<BR>===================================================================<BR>--- 
mlx4/kernel/bus/net/mlx4.h (revision 1993)<BR>+++ 
mlx4/kernel/bus/net/mlx4.h (working copy)<BR>@@ -271,12 +271,12 
@@<BR> <BR> struct mlx4_catas_err {<BR>  u32 
__iomem        *map;<BR>- struct 
list_head list;<BR>  /* Windows 
*/<BR>  int     stop;<BR>  KTIMER    timer;<BR>  KDPC    timer_dpc;<BR>  LARGE_INTEGER  interval;<BR>+ PIO_WORKITEM  catas_work;<BR> };<BR> <BR> struct 
mlx4_mac_table {<BR>@@ -375,7 +375,7 @@<BR> void 
mlx4_cleanup_srq_table(struct mlx4_dev *dev);<BR> void 
mlx4_cleanup_mcg_table(struct mlx4_dev *dev);<BR> <BR>-void 
mlx4_start_catas_poll(struct mlx4_dev *dev);<BR>+int 
mlx4_start_catas_poll(struct mlx4_dev *dev);<BR> void 
mlx4_stop_catas_poll(struct mlx4_dev *dev);<BR> int mlx4_restart_one(struct 
pci_dev *pdev);<BR> int mlx4_register_device(struct mlx4_dev *dev);<BR>@@ 
-434,6 +434,7 @@<BR> <BR> void mlx4_remove_eq(struct mlx4_dev *dev, u8 
eq_num);<BR> <BR>+int mlx4_reset_ready( struct ib_event_handler 
*event_handler );<BR> int mlx4_reset_execute( struct ib_event_handler 
*event_handler );<BR> <BR> int mlx4_reset_request( struct 
ib_event_handler *event_handler );<BR>Index: 
mlx4/kernel/bus/net/qp.c<BR>===================================================================<BR>--- 
mlx4/kernel/bus/net/qp.c (revision 1993)<BR>+++ 
mlx4/kernel/bus/net/qp.c (working copy)<BR>@@ -265,8 +265,7 
@@<BR> <BR>  if 
(atomic_dec_and_test(&qp->refcount))<BR>   complete(&qp->free);<BR>- if 
(!mlx4_is_barred(dev))<BR>-  wait_for_completion(&qp->free);<BR>+ wait_for_completion(&qp->free);<BR> <BR>  mlx4_table_put(dev, 
&qp_table->cmpt_table, qp->qpn);<BR>  mlx4_table_put(dev, 
&qp_table->rdmarc_table, qp->qpn);<BR>Index: 
mlx4/kernel/bus/net/srq.c<BR>===================================================================<BR>--- 
mlx4/kernel/bus/net/srq.c (revision 1993)<BR>+++ 
mlx4/kernel/bus/net/srq.c (working copy)<BR>@@ -218,8 +218,7 
@@<BR> <BR>  if 
(atomic_dec_and_test(&srq->refcount))<BR>   complete(&srq->free);<BR>- if 
(!mlx4_is_barred(dev))<BR>-  wait_for_completion(&srq->free);<BR>+ wait_for_completion(&srq->free);<BR> <BR>  mlx4_table_put(dev, 
&srq_table->table, 
srq->srqn);<BR>  mlx4_bitmap_free(&srq_table->bitmap, 
srq->srqn);<BR>Index: 
mlx4/kernel/inc/l2w.h<BR>===================================================================<BR>--- 
mlx4/kernel/inc/l2w.h (revision 1993)<BR>+++ 
mlx4/kernel/inc/l2w.h (working copy)<BR>@@ -334,7 +334,7 
@@<BR> <BR> static inline int mlx4_is_barred(struct mlx4_dev 
*dev)<BR> {<BR>- return dev->flags & (MLX4_FLAG_RESET_CLIENT | 
MLX4_FLAG_RESET_DRIVER);<BR>+ return dev->flags &  
MLX4_FLAG_RESET_DRIVER;<BR> }<BR> <BR> static inline int 
mlx4_is_in_reset(struct mlx4_dev *dev)<BR>Index: 
mlx4/kernel/inc/l2w_sync.h<BR>===================================================================<BR>--- 
mlx4/kernel/inc/l2w_sync.h (revision 1993)<BR>+++ 
mlx4/kernel/inc/l2w_sync.h (working copy)<BR>@@ -103,6 +103,7 
@@<BR> static inline int wait_for_completion_timeout( struct completion * 
compl, unsigned long timeout )<BR> {<BR>  LARGE_INTEGER 
interval;<BR>+ ASSERT(KeGetCurrentIrql() < 
DISPATCH_LEVEL);<BR>  interval.QuadPart = (-10)* 
(__int64)timeout;<BR>  return (int)KeWaitForSingleObject( 
&compl->event, Executive, KernelMode, FALSE,  &interval 
);<BR> }<BR></FONT></DIV></BODY></HTML>