mlx4: Extanding port_mask functionality

Port mask now has additional state.
Port can be set as "none". In this case neither the mlx4_en or mlx4_ib
drivers take ownership of the port.
In multifunction mode there is an option to set the vfs as single ported devices.
(in single function mode, both physical ports belong to same function)

Signed-off-by: Jack Morgenstein <[email protected]>
Signed-off-by: Yevgeny Petrilin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Jack Morgenstein 2011-12-13 04:10:41 +00:00 • committed by David S. Miller
commit 65dab25deb
3 changed files with 8 additions and 11 deletions

View file

@ -177,7 +177,7 @@ mlx4_ib_port_link_layer(struct ib_device *device, u8 port_num)
{
struct mlx4_dev *dev = to_mdev(device)->dev;
return dev->caps.port_mask & (1 << (port_num - 1)) ?
return dev->caps.port_mask[port_num] == MLX4_PORT_TYPE_IB ?
IB_LINK_LAYER_INFINIBAND : IB_LINK_LAYER_ETHERNET;
}