net/mlx5_core: Check the return bitmask when querying ISSI
authorHaggai Abramonvsky <hagaya@mellanox.com>
Thu, 4 Jun 2015 16:30:39 +0000 (19:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2015 23:41:01 +0000 (16:41 -0700)
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>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index 2510fed3494ddda7bdad2e693e49cf878e9547aa..11c7216a25174b0283aa9d3bbba1f77bd7ab8f08 100644 (file)
@@ -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;
        }