net/mlx4: Correctly configure single ported VFs from the host
authorMatan Barak <matanb@mellanox.com>
Wed, 10 Sep 2014 13:41:53 +0000 (16:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Sep 2014 22:21:34 +0000 (15:21 -0700)
commita91c772fa0275163508e1078ff6d474d423244fb
treec52dcd04f9912d257c686c7d461ea2ee253f51e0
parenta0e2c822bf0a1095dc250b5875e39ac0662a5df6
net/mlx4: Correctly configure single ported VFs from the host

Single port VFs are seen PCI wise on both ports of the PF (we don't have
single port PFs with ConnectX). With this in mind, it's possible for
virtualization tools to try and configure a single ported VF through
the "wrong" PF port.

To handle that, we use the PF driver mapping of single port VFs to NIC
ports and adjust the port value before calling into the low level
code that does the actual VF configuration

Fixes: 449fc48 ('net/mlx4: Adapt code for N-Port VF')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/cmd.c