[MLX4] add prints to Event Log in case of HCA resetting. [mlnx: 4723]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 3 Sep 2009 12:56:20 +0000 (12:56 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 3 Sep 2009 12:56:20 +0000 (12:56 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2422 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

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

index ae96da7..29b184c 100644 (file)
@@ -134,6 +134,8 @@ catas_reset_wi(
                if ( !NT_SUCCESS( status ) ) {
                        mlx4_err(dev, "Failed to reset HCA, aborting.(status %#x)\n", status);
                }
+               else
+                       mlx4_err(dev, "catas_reset_wi: HCA has been reset.\n");
                
                dev->flags |= MLX4_FLAG_RESET_DRIVER;   // bar the device
        }
index 3875683..365c970 100644 (file)
@@ -228,14 +228,17 @@ static int mlx4_cmd_poll(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
 
        if (cmd_pending(dev)) {
                err = -ETIMEDOUT;
+               mlx4_err(dev, "mlx4_cmd_poll: Command %02x completed with timeout after %d msecs \n",
+                         op, timeout);
 
                do_reset = InterlockedCompareExchange(&dev->reset_pending, 1, 0);
                if (!do_reset) {
-                       NTSTATUS status1;
-                       status1 = mlx4_reset(dev);
+                       NTSTATUS status1 = mlx4_reset(dev);
                        if ( !NT_SUCCESS( status1 ) ) {
-                               mlx4_err(dev, "Failed to reset HCA, aborting.(status %#x)\n", status1);
+                               mlx4_err(dev, "mlx4_cmd_poll: Failed to reset HCA, aborting.(status %#x)\n", status1);
                        }
+                       else
+                               mlx4_err(dev, "mlx4_cmd_poll: HCA has been reset.\n");
                        
                        dev->flags |= MLX4_FLAG_RESET_DRIVER;   // bar the device
                }
@@ -331,8 +334,10 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
                        if (!do_reset) {
                                NTSTATUS status = mlx4_reset(dev);
                                if ( !NT_SUCCESS( status ) ) {
-                                       mlx4_err(dev, "Failed to reset HCA, aborting.(status %#x)\n", status);
+                                       mlx4_err(dev, "mlx4_cmd_wait: Failed to reset HCA, aborting.(status %#x)\n", status);
                                }
+                               else
+                                       mlx4_err(dev, "mlx4_cmd_wait: HCA has been reset.\n");
                                
                                dev->flags |= MLX4_FLAG_RESET_DRIVER;   // bar the device
                        }