mlx4_core: using array index for sense_allowed
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Thu, 29 Dec 2011 07:42:34 +0000 (07:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Dec 2011 20:08:41 +0000 (15:08 -0500)
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c

index 1209934..6bb62c5 100644 (file)
@@ -332,7 +332,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
                 * and perform sense_port FW command to try and set the correct
                 * port type from beginning
                 */
-               if (mlx4_priv(dev)->sense.sense_allowed && dev->caps.default_sense[i]) {
+               if (mlx4_priv(dev)->sense.sense_allowed[i] && dev->caps.default_sense[i]) {
                        enum mlx4_port_type sensed_port = MLX4_PORT_TYPE_NONE;
                        dev->caps.possible_type[i] = MLX4_PORT_TYPE_AUTO;
                        mlx4_SENSE_PORT(dev, i, &sensed_port);