diff options
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 48d0e90194c..2f816c6aed7 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -157,9 +157,6 @@ int mlx4_check_port_params(struct mlx4_dev *dev, | |||
157 | "on this HCA, aborting.\n"); | 157 | "on this HCA, aborting.\n"); |
158 | return -EINVAL; | 158 | return -EINVAL; |
159 | } | 159 | } |
160 | if (port_type[i] == MLX4_PORT_TYPE_ETH && | ||
161 | port_type[i + 1] == MLX4_PORT_TYPE_IB) | ||
162 | return -EINVAL; | ||
163 | } | 160 | } |
164 | } | 161 | } |
165 | 162 | ||
@@ -1237,13 +1234,13 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1237 | mlx4_info(dev, "non-primary physical function, skipping.\n"); | 1234 | mlx4_info(dev, "non-primary physical function, skipping.\n"); |
1238 | else | 1235 | else |
1239 | mlx4_err(dev, "QUERY_FW command failed, aborting.\n"); | 1236 | mlx4_err(dev, "QUERY_FW command failed, aborting.\n"); |
1240 | goto unmap_bf; | 1237 | return err; |
1241 | } | 1238 | } |
1242 | 1239 | ||
1243 | err = mlx4_load_fw(dev); | 1240 | err = mlx4_load_fw(dev); |
1244 | if (err) { | 1241 | if (err) { |
1245 | mlx4_err(dev, "Failed to start FW, aborting.\n"); | 1242 | mlx4_err(dev, "Failed to start FW, aborting.\n"); |
1246 | goto unmap_bf; | 1243 | return err; |
1247 | } | 1244 | } |
1248 | 1245 | ||
1249 | mlx4_cfg.log_pg_sz_m = 1; | 1246 | mlx4_cfg.log_pg_sz_m = 1; |
@@ -1307,7 +1304,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1307 | err = mlx4_init_slave(dev); | 1304 | err = mlx4_init_slave(dev); |
1308 | if (err) { | 1305 | if (err) { |
1309 | mlx4_err(dev, "Failed to initialize slave\n"); | 1306 | mlx4_err(dev, "Failed to initialize slave\n"); |
1310 | goto unmap_bf; | 1307 | return err; |
1311 | } | 1308 | } |
1312 | 1309 | ||
1313 | err = mlx4_slave_cap(dev); | 1310 | err = mlx4_slave_cap(dev); |
@@ -1327,7 +1324,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1327 | err = mlx4_QUERY_ADAPTER(dev, &adapter); | 1324 | err = mlx4_QUERY_ADAPTER(dev, &adapter); |
1328 | if (err) { | 1325 | if (err) { |
1329 | mlx4_err(dev, "QUERY_ADAPTER command failed, aborting.\n"); | 1326 | mlx4_err(dev, "QUERY_ADAPTER command failed, aborting.\n"); |
1330 | goto err_close; | 1327 | goto unmap_bf; |
1331 | } | 1328 | } |
1332 | 1329 | ||
1333 | priv->eq_table.inta_pin = adapter.inta_pin; | 1330 | priv->eq_table.inta_pin = adapter.inta_pin; |
@@ -1335,6 +1332,9 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1335 | 1332 | ||
1336 | return 0; | 1333 | return 0; |
1337 | 1334 | ||
1335 | unmap_bf: | ||
1336 | unmap_bf_area(dev); | ||
1337 | |||
1338 | err_close: | 1338 | err_close: |
1339 | mlx4_close_hca(dev); | 1339 | mlx4_close_hca(dev); |
1340 | 1340 | ||
@@ -1347,8 +1347,6 @@ err_stop_fw: | |||
1347 | mlx4_UNMAP_FA(dev); | 1347 | mlx4_UNMAP_FA(dev); |
1348 | mlx4_free_icm(dev, priv->fw.fw_icm, 0); | 1348 | mlx4_free_icm(dev, priv->fw.fw_icm, 0); |
1349 | } | 1349 | } |
1350 | unmap_bf: | ||
1351 | unmap_bf_area(dev); | ||
1352 | return err; | 1350 | return err; |
1353 | } | 1351 | } |
1354 | 1352 | ||
@@ -1999,7 +1997,8 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1999 | } | 1997 | } |
2000 | 1998 | ||
2001 | slave_start: | 1999 | slave_start: |
2002 | if (mlx4_cmd_init(dev)) { | 2000 | err = mlx4_cmd_init(dev); |
2001 | if (err) { | ||
2003 | mlx4_err(dev, "Failed to init command interface, aborting.\n"); | 2002 | mlx4_err(dev, "Failed to init command interface, aborting.\n"); |
2004 | goto err_sriov; | 2003 | goto err_sriov; |
2005 | } | 2004 | } |