mlx4_core: Fixing array indexes when setting port types
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e3e09f2645
commit
1e0f03d57d
1 changed files with 1 additions and 1 deletions
|
@ -538,7 +538,7 @@ int mlx4_change_port_types(struct mlx4_dev *dev,
|
|||
mlx4_unregister_device(dev);
|
||||
for (port = 1; port <= dev->caps.num_ports; port++) {
|
||||
mlx4_CLOSE_PORT(dev, port);
|
||||
dev->caps.port_type[port + 1] = port_types[port];
|
||||
dev->caps.port_type[port] = port_types[port - 1];
|
||||
err = mlx4_SET_PORT(dev, port);
|
||||
if (err) {
|
||||
mlx4_err(dev, "Failed to set port %d, "
|
||||
|
|
Loading…
Add table
Reference in a new issue