aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/lio_main.c
diff options
context:
space:
mode:
authorDerek Chickles <derek.chickles@cavium.com>2017-08-01 15:05:07 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-02 16:50:14 -0700
commitcf19a8c3d515d8c9d88d804437c6ac291eeaa2aa (patch)
tree5e071141712d7230d01f4fd711ded8d5c348f6ef /drivers/net/ethernet/cavium/liquidio/lio_main.c
parentnet: dsa: Add support for 64-bit statistics (diff)
downloadlinux-dev-cf19a8c3d515d8c9d88d804437c6ac291eeaa2aa.tar.xz
linux-dev-cf19a8c3d515d8c9d88d804437c6ac291eeaa2aa.zip
liquidio: set sriov_totalvfs correctly
The file /sys/devices/pci000.../sriov_totalvfs is showing a wrong value. Fix it by calling pci_sriov_set_totalvfs() to set the total number of VFs available after calculations for the number of PF and VF queues are made. Signed-off-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 1d8fefa9ce64..39a8dca35ffa 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1825,6 +1825,11 @@ static int octeon_chip_specific_setup(struct octeon_device *oct)
case OCTEON_CN23XX_PCIID_PF:
oct->chip_id = OCTEON_CN23XX_PF_VID;
ret = setup_cn23xx_octeon_pf_device(oct);
+#ifdef CONFIG_PCI_IOV
+ if (!ret)
+ pci_sriov_set_totalvfs(oct->pci_dev,
+ oct->sriov_info.max_vfs);
+#endif
s = "CN23XX";
break;