提交 3c2fa83f 编写于 作者: Y Yevgeny Petrilin 提交者: David S. Miller

mlx4_en: Work with part of the ports.

If the initialization of one of the ports failed,
there is no need to fail the other one as well.
Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9e47edaa
...@@ -248,28 +248,11 @@ static void *mlx4_en_add(struct mlx4_dev *dev) ...@@ -248,28 +248,11 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
/* Create a netdev for each port */ /* Create a netdev for each port */
mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) { mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) {
mlx4_info(mdev, "Activating port:%d\n", i); mlx4_info(mdev, "Activating port:%d\n", i);
if (mlx4_en_init_netdev(mdev, i, &mdev->profile.prof[i])) { if (mlx4_en_init_netdev(mdev, i, &mdev->profile.prof[i]))
mdev->pndev[i] = NULL; mdev->pndev[i] = NULL;
goto err_free_netdev;
}
} }
return mdev; return mdev;
err_free_netdev:
mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) {
if (mdev->pndev[i])
mlx4_en_destroy_netdev(mdev->pndev[i]);
}
mutex_lock(&mdev->state_lock);
mdev->device_up = false;
mutex_unlock(&mdev->state_lock);
flush_workqueue(mdev->workqueue);
/* Stop event queue before we drop down to release shared SW state */
destroy_workqueue(mdev->workqueue);
err_mr: err_mr:
mlx4_mr_free(dev, &mdev->mr); mlx4_mr_free(dev, &mdev->mr);
err_uar: err_uar:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册