diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2011-03-22 18:37:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-23 15:24:17 -0400 |
commit | 908222655b38005483d64385e06341a38647fdf1 (patch) | |
tree | 2f88b9aaa2d16486987e13070a7fd6c69e76fc3f /drivers | |
parent | 46afd0fb01d62ee217f142ab9c26054304ab7454 (diff) |
mlx4_en: bringing link up when registering netdevice
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/mlx4/en_netdev.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index b1180dd5e173..5727bf5ad452 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -1069,6 +1069,23 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | |||
1069 | en_warn(priv, "Using %d TX rings\n", prof->tx_ring_num); | 1069 | en_warn(priv, "Using %d TX rings\n", prof->tx_ring_num); |
1070 | en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); | 1070 | en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); |
1071 | 1071 | ||
1072 | /* Configure port */ | ||
1073 | err = mlx4_SET_PORT_general(mdev->dev, priv->port, | ||
1074 | MLX4_EN_MIN_MTU, | ||
1075 | 0, 0, 0, 0); | ||
1076 | if (err) { | ||
1077 | en_err(priv, "Failed setting port general configurations " | ||
1078 | "for port %d, with error %d\n", priv->port, err); | ||
1079 | goto out; | ||
1080 | } | ||
1081 | |||
1082 | /* Init port */ | ||
1083 | en_warn(priv, "Initializing port\n"); | ||
1084 | err = mlx4_INIT_PORT(mdev->dev, priv->port); | ||
1085 | if (err) { | ||
1086 | en_err(priv, "Failed Initializing port\n"); | ||
1087 | goto out; | ||
1088 | } | ||
1072 | priv->registered = 1; | 1089 | priv->registered = 1; |
1073 | mlx4_en_set_default_moderation(priv); | 1090 | mlx4_en_set_default_moderation(priv); |
1074 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); | 1091 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); |