diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2012-02-23 02:04:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-24 01:52:45 -0500 |
commit | 1e0f03d57d7092f1f4d93a91fb7ece57b1514a88 (patch) | |
tree | f366e42ce668e4786bc3514afd54aae5fbd8dde6 | |
parent | e3e09f2645b435062a34a2587a32ae8e5a5b48ab (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 32f8799db190..d498f049c74e 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -538,7 +538,7 @@ int mlx4_change_port_types(struct mlx4_dev *dev, | |||
538 | mlx4_unregister_device(dev); | 538 | mlx4_unregister_device(dev); |
539 | for (port = 1; port <= dev->caps.num_ports; port++) { | 539 | for (port = 1; port <= dev->caps.num_ports; port++) { |
540 | mlx4_CLOSE_PORT(dev, port); | 540 | mlx4_CLOSE_PORT(dev, port); |
541 | dev->caps.port_type[port + 1] = port_types[port]; | 541 | dev->caps.port_type[port] = port_types[port - 1]; |
542 | err = mlx4_SET_PORT(dev, port); | 542 | err = mlx4_SET_PORT(dev, port); |
543 | if (err) { | 543 | if (err) { |
544 | mlx4_err(dev, "Failed to set port %d, " | 544 | mlx4_err(dev, "Failed to set port %d, " |