Skip to content

Commit

Permalink
mlx4_en: Assign dummy event handler for TX queue
Browse files Browse the repository at this point in the history
The low level driver always assumes this handler exists.
The lack of it could cause kernel panic

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Apr 21, 2009
1 parent 1e338db commit 966508f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 6 additions & 0 deletions drivers/net/mlx4/en_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ void mlx4_en_unmap_buffer(struct mlx4_buf *buf)

vunmap(buf->direct.buf);
}

void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event)
{
return;
}

6 changes: 0 additions & 6 deletions drivers/net/mlx4/en_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,12 +928,6 @@ void mlx4_en_set_default_rss_map(struct mlx4_en_priv *priv,
}
}

static void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event)
{
return;
}


static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv,
int qpn, int srqn, int cqn,
enum mlx4_qp_state *state,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/mlx4/en_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
mlx4_err(mdev, "Failed allocating qp %d\n", ring->qpn);
goto err_reserve;
}
ring->qp.event = mlx4_en_sqp_event;

return 0;

Expand Down
1 change: 1 addition & 0 deletions drivers/net/mlx4/mlx4_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget);
void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
int is_tx, int rss, int qpn, int cqn, int srqn,
struct mlx4_qp_context *context);
void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event);
int mlx4_en_map_buffer(struct mlx4_buf *buf);
void mlx4_en_unmap_buffer(struct mlx4_buf *buf);

Expand Down

0 comments on commit 966508f

Please sign in to comment.