diff options
author | Benjamin Poirier <bpoirier@suse.de> | 2015-05-22 19:12:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-27 13:08:03 -0400 |
commit | f4ecf29fd78d19a9301e638eaa1419e5c8fbdce1 (patch) | |
tree | 04d8fa0083cf0ae0b4480a02a86a6d87902d7917 /drivers/net | |
parent | ce0e5c522d3924090c20e774359809a7aa08c44c (diff) |
mlx4_core: Fix fallback from MSI-X to INTx
The test in mlx4_load_one() to remove MLX4_FLAG_MSI_X expects mlx4_NOP() to
fail with -EBUSY. It is also necessary to avoid the reset since the device
is not fully reinitialized before calling mlx4_start_hca() a second time.
Note that this will also affect mlx4_test_interrupts(), the only other user
of MLX4_CMD_NOP.
Fixes: f5aef5a ("net/mlx4_core: Activate reset flow upon fatal command cases")
Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/cmd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index 4f7dc044601e..529ef0594b90 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c | |||
@@ -714,8 +714,13 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param, | |||
714 | msecs_to_jiffies(timeout))) { | 714 | msecs_to_jiffies(timeout))) { |
715 | mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n", | 715 | mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n", |
716 | op); | 716 | op); |
717 | err = -EIO; | 717 | if (op == MLX4_CMD_NOP) { |
718 | goto out_reset; | 718 | err = -EBUSY; |
719 | goto out; | ||
720 | } else { | ||
721 | err = -EIO; | ||
722 | goto out_reset; | ||
723 | } | ||
719 | } | 724 | } |
720 | 725 | ||
721 | err = context->result; | 726 | err = context->result; |