[MLX4] improvements in Soft Reset mechanism [mlnx: 3363]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Oct 2008 19:15:53 +0000 (19:15 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Oct 2008 19:15:53 +0000 (19:15 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1694 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mlx4/kernel/bus/net/catas.c
hw/mlx4/kernel/bus/net/cmd.c
hw/mlx4/kernel/bus/net/eq.c

index 564d554..29132a2 100644 (file)
@@ -41,7 +41,7 @@ static LIST_HEAD(catas_list);
 
 // TODO: put into Globals
 // "Reset device on internal errors if non-zero (default 1)")
-int g_internal_err_reset = 1;
+int g_internal_err_reset = 0;
 
 static void dispatch_event(struct ib_device *ibdev, enum ib_event_type type)
 {
@@ -307,19 +307,11 @@ card_reset_wi(
        IN                              DEVICE_OBJECT*                          p_dev_obj,
        IN                              struct ib_event_handler *       event_handler )
 {
-       NTSTATUS status;
        struct ib_device *ibdev = event_handler->device;
-       struct mlx4_dev *dev = ibdev->dma_device;
 
        UNUSED_PARAM(p_dev_obj);
        IoFreeWorkItem( event_handler->rsrv_ptr );
 
-       // reset the card
-       mlx4_stop_catas_poll( dev );
-       status = mlx4_reset( dev );
-       if ( !NT_SUCCESS( status ) )
-               mlx4_err( dev, "Failed to reset HCA, aborting. (status %#x)\n", status );
-
        // notify the clients
        dispatch_event(ibdev, IB_EVENT_RESET_CLIENT);
 }
index 123ad70..a27a638 100644 (file)
@@ -389,6 +389,9 @@ int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
                __print_opcode(op), mlx4_priv(dev)->cmd.use_events, in_param, out_param, 
                out_is_imm, in_modifier, (int)op_modifier);
 #endif
+
+       if ( mlx4_is_barred(dev) )
+               return -EFAULT;
        
        if (mlx4_priv(dev)->cmd.use_events)
                return mlx4_cmd_wait(dev, in_param, out_param, out_is_imm,
@@ -527,9 +530,6 @@ EXPORT_SYMBOL_GPL(mlx4_free_cmd_mailbox);
 int imlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param, int out_is_imm,
                u32 in_modifier, u8 op_modifier, u16 op, unsigned long timeout)
 {
-       if ( mlx4_is_barred(dev) )
-               return -EFAULT;
-       
        return __mlx4_cmd(dev, in_param, out_param, out_is_imm, in_modifier,
                          op_modifier, op, timeout);
 }
index 0ba17e6..5f12eac 100644 (file)
@@ -435,12 +435,13 @@ static void mlx4_free_eq(struct mlx4_dev *dev,
        int i;
 
        mailbox = mlx4_alloc_cmd_mailbox(dev);
-       if (IS_ERR(mailbox))
-               return;
-
-       err = mlx4_HW2SW_EQ(dev, mailbox, eq->eqn);
-       if (err)
-               mlx4_warn(dev, "HW2SW_EQ failed (%d)\n", err);
+       if (IS_ERR(mailbox)) 
+               mailbox = NULL;
+       else {
+               err = mlx4_HW2SW_EQ(dev, mailbox, eq->eqn);
+               if (err)
+                       mlx4_warn(dev, "HW2SW_EQ failed (%d)\n", err);
+       }
 
 #if 0
        {