nfp: print a warning when binding VFs to PF driver [Linux 5.3]

This Linux kernel change "nfp: print a warning when binding VFs to PF driver" is included in the Linux 5.3 release. This change is authored by Jakub Kicinski <jakub.kicinski [at] netronome.com> on Wed Jun 12 16:59:03 2019 -0700. The commit for this change in Linux stable tree is f767fc6 (patch).

nfp: print a warning when binding VFs to PF driver

Users sometimes mistakenly try to manually bind the PF driver
to the VFs, print a warning message in that case.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/ethernet/netronome/nfp/nfp_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c
index 948d1a4..60e57f0 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c
@@ -596,6 +596,10 @@ static int nfp_pci_probe(struct pci_dev *pdev,
    struct nfp_pf *pf;
    int err;

+   if (pdev->vendor == PCI_VENDOR_ID_NETRONOME &&
+       pdev->device == PCI_DEVICE_ID_NETRONOME_NFP6000_VF)
+       dev_warn(&pdev->dev, "Binding NFP VF device to the NFP PF driver, the VF driver is called 'nfp_netvf'\n");
+
    err = pci_enable_device(pdev);
    if (err < 0)
        return err;

Leave a Reply

Your email address will not be published. Required fields are marked *