IB/mlx5: Add legacy events to DEVX list
Add two events that were defined in the device specification but were not exposed in the driver list. Post this patch those events can be read over the DEVX events interface once be reported by the firmware. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Reviewed-by: Edward Srouji <edwards@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Link: https://lore.kernel.org/r/20190808084358.29517-4-leon@kernel.org Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
749b9eef50
commit
972d7560ee
|
@ -233,6 +233,8 @@ static bool is_legacy_obj_event_num(u16 event_num)
|
|||
case MLX5_EVENT_TYPE_SRQ_CATAS_ERROR:
|
||||
case MLX5_EVENT_TYPE_DCT_DRAINED:
|
||||
case MLX5_EVENT_TYPE_COMP:
|
||||
case MLX5_EVENT_TYPE_DCT_KEY_VIOLATION:
|
||||
case MLX5_EVENT_TYPE_XRQ_ERROR:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -315,8 +317,10 @@ static u16 get_event_obj_type(unsigned long event_type, struct mlx5_eqe *eqe)
|
|||
case MLX5_EVENT_TYPE_SRQ_CATAS_ERROR:
|
||||
return eqe->data.qp_srq.type;
|
||||
case MLX5_EVENT_TYPE_CQ_ERROR:
|
||||
case MLX5_EVENT_TYPE_XRQ_ERROR:
|
||||
return 0;
|
||||
case MLX5_EVENT_TYPE_DCT_DRAINED:
|
||||
case MLX5_EVENT_TYPE_DCT_KEY_VIOLATION:
|
||||
return MLX5_EVENT_QUEUE_TYPE_DCT;
|
||||
default:
|
||||
return MLX5_GET(affiliated_event_header, &eqe->data, obj_type);
|
||||
|
@ -2300,7 +2304,11 @@ static u32 devx_get_obj_id_from_event(unsigned long event_type, void *data)
|
|||
case MLX5_EVENT_TYPE_WQ_ACCESS_ERROR:
|
||||
obj_id = be32_to_cpu(eqe->data.qp_srq.qp_srq_n) & 0xffffff;
|
||||
break;
|
||||
case MLX5_EVENT_TYPE_XRQ_ERROR:
|
||||
obj_id = be32_to_cpu(eqe->data.xrq_err.type_xrqn) & 0xffffff;
|
||||
break;
|
||||
case MLX5_EVENT_TYPE_DCT_DRAINED:
|
||||
case MLX5_EVENT_TYPE_DCT_KEY_VIOLATION:
|
||||
obj_id = be32_to_cpu(eqe->data.dct.dctn) & 0xffffff;
|
||||
break;
|
||||
case MLX5_EVENT_TYPE_CQ_ERROR:
|
||||
|
|
|
@ -328,6 +328,7 @@ enum mlx5_event {
|
|||
MLX5_EVENT_TYPE_GPIO_EVENT = 0x15,
|
||||
MLX5_EVENT_TYPE_PORT_MODULE_EVENT = 0x16,
|
||||
MLX5_EVENT_TYPE_TEMP_WARN_EVENT = 0x17,
|
||||
MLX5_EVENT_TYPE_XRQ_ERROR = 0x18,
|
||||
MLX5_EVENT_TYPE_REMOTE_CONFIG = 0x19,
|
||||
MLX5_EVENT_TYPE_GENERAL_EVENT = 0x22,
|
||||
MLX5_EVENT_TYPE_MONITOR_COUNTER = 0x24,
|
||||
|
@ -345,6 +346,7 @@ enum mlx5_event {
|
|||
MLX5_EVENT_TYPE_ESW_FUNCTIONS_CHANGED = 0xe,
|
||||
|
||||
MLX5_EVENT_TYPE_DCT_DRAINED = 0x1c,
|
||||
MLX5_EVENT_TYPE_DCT_KEY_VIOLATION = 0x1d,
|
||||
|
||||
MLX5_EVENT_TYPE_FPGA_ERROR = 0x20,
|
||||
MLX5_EVENT_TYPE_FPGA_QP_ERROR = 0x21,
|
||||
|
@ -584,6 +586,12 @@ struct mlx5_eqe_cq_err {
|
|||
u8 syndrome;
|
||||
};
|
||||
|
||||
struct mlx5_eqe_xrq_err {
|
||||
__be32 reserved1[5];
|
||||
__be32 type_xrqn;
|
||||
__be32 reserved2;
|
||||
};
|
||||
|
||||
struct mlx5_eqe_port_state {
|
||||
u8 reserved0[8];
|
||||
u8 port;
|
||||
|
@ -698,6 +706,7 @@ union ev_data {
|
|||
struct mlx5_eqe_pps pps;
|
||||
struct mlx5_eqe_dct dct;
|
||||
struct mlx5_eqe_temp_warning temp_warning;
|
||||
struct mlx5_eqe_xrq_err xrq_err;
|
||||
} __packed;
|
||||
|
||||
struct mlx5_eqe {
|
||||
|
|
Loading…
Reference in New Issue