|
@@ -531,15 +531,14 @@ int mlx4_change_port_types(struct mlx4_dev *dev,
|
|
for (port = 0; port < dev->caps.num_ports; port++) {
|
|
for (port = 0; port < dev->caps.num_ports; port++) {
|
|
/* Change the port type only if the new type is different
|
|
/* Change the port type only if the new type is different
|
|
* from the current, and not set to Auto */
|
|
* from the current, and not set to Auto */
|
|
- if (port_types[port] != dev->caps.port_type[port + 1]) {
|
|
|
|
|
|
+ if (port_types[port] != dev->caps.port_type[port + 1])
|
|
change = 1;
|
|
change = 1;
|
|
- dev->caps.port_type[port + 1] = port_types[port];
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
if (change) {
|
|
if (change) {
|
|
mlx4_unregister_device(dev);
|
|
mlx4_unregister_device(dev);
|
|
for (port = 1; port <= dev->caps.num_ports; port++) {
|
|
for (port = 1; port <= dev->caps.num_ports; port++) {
|
|
mlx4_CLOSE_PORT(dev, port);
|
|
mlx4_CLOSE_PORT(dev, port);
|
|
|
|
+ dev->caps.port_type[port + 1] = port_types[port];
|
|
err = mlx4_SET_PORT(dev, port);
|
|
err = mlx4_SET_PORT(dev, port);
|
|
if (err) {
|
|
if (err) {
|
|
mlx4_err(dev, "Failed to set port %d, "
|
|
mlx4_err(dev, "Failed to set port %d, "
|