Browse Source

net/mlx5_core: Check the return bitmask when querying ISSI

The determination of the supported ISSI versions should be conditioned
on the returned mask, and not only on the return status of the query
ISSI command, fix that.

Signed-off-by: Haggai Abramovsky <hagaya@mellanox.com>
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Haggai Abramonvsky 10 years ago
parent
commit
e74a1db033
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/ethernet/mellanox/mlx5/core/main.c

+ 1 - 1
drivers/net/ethernet/mellanox/mlx5/core/main.c

@@ -654,7 +654,7 @@ static int mlx5_core_set_issi(struct mlx5_core_dev *dev)
 		dev->issi = 1;
 
 		return 0;
-	} else if (sup_issi & (1 << 0)) {
+	} else if (sup_issi & (1 << 0) || !sup_issi) {
 		return 0;
 	}