mlx4_en: Assign dummy event handler for TX queue
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Mon, 20 Apr 2009 04:30:03 +0000 (04:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Apr 2009 08:47:05 +0000 (01:47 -0700)
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>
drivers/net/mlx4/en_resources.c
drivers/net/mlx4/en_rx.c
drivers/net/mlx4/en_tx.c
drivers/net/mlx4/mlx4_en.h

index a054520..65ca706 100644 (file)
@@ -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;
+}
+
index 8673008..0cbb78c 100644 (file)
@@ -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,
index 4afd599..ac6fc49 100644 (file)
@@ -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;
 
index e9af32d..ef840ab 100644 (file)
@@ -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);