From 0cd9302734111abc0b5912b695336f2ee63cb22b Mon Sep 17 00:00:00 2001 From: Yishai Hadas Date: Sun, 25 Jan 2015 16:59:43 +0200 Subject: net/mlx4_core: Reset flow activation upon SRIOV fatal command cases When SRIOV commands are executed over the comm-channel and get a fatal error (e.g. timeout, closing command failure) the VF enters into error state and reset flow is activated. To be able to recognize whether the failure was on a closing command, the operational code for the given VHCR command is used. Once the device entered into an error state we prevent redundant error messages from being printed. Signed-off-by: Yishai Hadas Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4.h') diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index 2a15b8248e77..096a81c16a9b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h @@ -123,6 +123,8 @@ enum mlx4_mpt_state { #define MLX4_COMM_TIME 10000 #define MLX4_COMM_OFFLINE_TIME_OUT 30000 +#define MLX4_COMM_CMD_NA_OP 0x0 + enum { MLX4_COMM_CMD_RESET, @@ -1173,7 +1175,7 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev); void mlx4_cmd_use_polling(struct mlx4_dev *dev); int mlx4_comm_cmd(struct mlx4_dev *dev, u8 cmd, u16 param, - unsigned long timeout); + u16 op, unsigned long timeout); void mlx4_cq_tasklet_cb(unsigned long data); void mlx4_cq_completion(struct mlx4_dev *dev, u32 cqn); -- cgit