Commit 09e574fa authored by Saeed Mahameed's avatar Saeed Mahameed

IB/mlx5: Handle raw delay drop general event

Handle FW general event rq delay drop as it was received from FW via mlx5
notifiers API, instead of handling the processed software version of that
event. After this patch we can safely remove all software processed FW
events types and definitions.
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent cb6191bf
...@@ -4236,6 +4236,18 @@ static void delay_drop_handler(struct work_struct *work) ...@@ -4236,6 +4236,18 @@ static void delay_drop_handler(struct work_struct *work)
mutex_unlock(&delay_drop->lock); mutex_unlock(&delay_drop->lock);
} }
static void handle_general_event(struct mlx5_ib_dev *ibdev, struct mlx5_eqe *eqe,
struct ib_event *ibev)
{
switch (eqe->sub_type) {
case MLX5_GENERAL_SUBTYPE_DELAY_DROP_TIMEOUT:
schedule_work(&ibdev->delay_drop.delay_drop_work);
break;
default: /* do nothing */
return;
}
}
static int handle_port_change(struct mlx5_ib_dev *ibdev, struct mlx5_eqe *eqe, static int handle_port_change(struct mlx5_ib_dev *ibdev, struct mlx5_eqe *eqe,
struct ib_event *ibev) struct ib_event *ibev)
{ {
...@@ -4308,9 +4320,9 @@ static void mlx5_ib_handle_event(struct work_struct *_work) ...@@ -4308,9 +4320,9 @@ static void mlx5_ib_handle_event(struct work_struct *_work)
if (handle_port_change(ibdev, work->param, &ibev)) if (handle_port_change(ibdev, work->param, &ibev))
goto out; goto out;
break; break;
case MLX5_DEV_EVENT_DELAY_DROP_TIMEOUT: case MLX5_EVENT_TYPE_GENERAL_EVENT:
schedule_work(&ibdev->delay_drop.delay_drop_work); handle_general_event(ibdev, work->param, &ibev);
goto out; /* fall through */
default: default:
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment