Skip to content

Commit f4ecf29

Browse files
gobenjidavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ce0e5c5 commit f4ecf29

File tree

1 file changed

+7
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+7
-2
lines changed

drivers/net/ethernet/mellanox/mlx4/cmd.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,13 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
714714
msecs_to_jiffies(timeout))) {
715715
mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n",
716716
op);
717-
err = -EIO;
718-
goto out_reset;
717+
if (op == MLX4_CMD_NOP) {
718+
err = -EBUSY;
719+
goto out;
720+
} else {
721+
err = -EIO;
722+
goto out_reset;
723+
}
719724
}
720725

721726
err = context->result;

0 commit comments

Comments
 (0)