aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2012-06-24 20:24:11 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-25 19:30:12 -0400
commit5c8e9046662889265c0ff390c144188721cb0844 (patch)
tree50a9601197840e2cdf781c943404e655c8c0983a /drivers/net
parent6de0298ec9c1edaf330b71b57346241ece8f3346 (diff)
net/mlx4_en: Set correct port parameters during device initialization
Set valid port parameters: MTU and flow control configuration when configuring the port during HW device initialization, prior to the net device open() being called. Using invalid parameters (such as all zeros) could lead to bad firmware behavior. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 926d8aac941c..a80280eee06e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1204,9 +1204,11 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
1204 en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); 1204 en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num);
1205 1205
1206 /* Configure port */ 1206 /* Configure port */
1207 mlx4_en_calc_rx_buf(dev);
1207 err = mlx4_SET_PORT_general(mdev->dev, priv->port, 1208 err = mlx4_SET_PORT_general(mdev->dev, priv->port,
1208 MLX4_EN_MIN_MTU, 1209 priv->rx_skb_size + ETH_FCS_LEN,
1209 0, 0, 0, 0); 1210 prof->tx_pause, prof->tx_ppp,
1211 prof->rx_pause, prof->rx_ppp);
1210 if (err) { 1212 if (err) {
1211 en_err(priv, "Failed setting port general configurations " 1213 en_err(priv, "Failed setting port general configurations "
1212 "for port %d, with error %d\n", priv->port, err); 1214 "for port %d, with error %d\n", priv->port, err);