提交 1e0f03d5 编写于 作者: Y Yevgeny Petrilin 提交者: David S. Miller

mlx4_core: Fixing array indexes when setting port types

Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e3e09f26
......@@ -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, "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册