summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorYishai Hadas2015-01-25 15:59:38 +0100
committerDavid S. Miller2015-01-25 23:43:14 +0100
commitf6bc11e42646e661e699a5593cbd1e9dba7191d0 (patch)
tree184f01eb39d1c694b149b5b19bd6d06a86209a6f /include/linux/mlx4
parentnet/mlx4_core: Refactor the catas flow to work per device (diff)
downloadkernel-qcow2-linux-f6bc11e42646e661e699a5593cbd1e9dba7191d0.tar.gz
kernel-qcow2-linux-f6bc11e42646e661e699a5593cbd1e9dba7191d0.tar.xz
kernel-qcow2-linux-f6bc11e42646e661e699a5593cbd1e9dba7191d0.zip
net/mlx4_core: Enhance the catas flow to support device reset
This includes: - resetting the chip when a fatal error is detected (the current code does not do this). - exposing the ability to enter error state from outside the catas code by calling its functionality. (E.g. FW Command timeout, AER error). - managing a persistent device state. This is needed to sync between reset flow cases. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index da425d2f3708..7d5d317cb7a6 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -411,6 +411,11 @@ enum {
MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK = 1 << 4,
};
+enum {
+ MLX4_DEVICE_STATE_UP = 1 << 0,
+ MLX4_DEVICE_STATE_INTERNAL_ERROR = 1 << 1,
+};
+
#define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \
MLX4_EQ_PORT_INFO_MSTR_SM_LID_CHANGE_MASK)
@@ -753,6 +758,8 @@ struct mlx4_dev_persistent {
enum mlx4_port_type curr_port_poss_type[MLX4_MAX_PORTS + 1];
struct work_struct catas_work;
struct workqueue_struct *catas_wq;
+ struct mutex device_state_mutex; /* protect HW state */
+ u8 state;
};
struct mlx4_dev {