diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2011-12-29 07:42:39 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-29 15:08:41 -0500 |
commit | 95f56e7aa807e9eec241a5b70f0695b2514b5ad5 (patch) | |
tree | b78e9c1909e7b0b0b978f7eac0dff11111fd023f /drivers | |
parent | 46c4674754cbb2bda00df652c4366086573c9b5a (diff) | |
download | linux-3.10-95f56e7aa807e9eec241a5b70f0695b2514b5ad5.tar.gz linux-3.10-95f56e7aa807e9eec241a5b70f0695b2514b5ad5.tar.bz2 linux-3.10-95f56e7aa807e9eec241a5b70f0695b2514b5ad5.zip |
mlx4_core: limiting VF port options
At the moment VFs can only operate in Eth mode.
In addition we don't want the VF to attempt link sensing,
so we block this option as well.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index e0639ebebe5..8bcc66f2c2a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -657,6 +657,8 @@ int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave, u8 port_type; int err; +#define MLX4_VF_PORT_ETH_ONLY_MASK 0xE6 + err = mlx4_cmd_box(dev, 0, outbox->dma, vhcr->in_modifier, 0, MLX4_CMD_QUERY_PORT, MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE); @@ -671,8 +673,8 @@ int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave, MLX4_GET(port_type, outbox->buf, QUERY_PORT_SUPPORTED_TYPE_OFFSET); - /* disable ib */ - port_type &= 0xFE; + /* Allow only Eth port, no link sensing allowed */ + port_type &= MLX4_VF_PORT_ETH_ONLY_MASK; /* check eth is enabled for this port */ if (!(port_type & 2)) |