qed: VFs gracefully accept lack of PM
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Sun, 15 May 2016 11:48:09 +0000 (14:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2016 17:59:19 +0000 (13:59 -0400)
VF's probe might log that it has no PM capability in its PCI configuration
space. As this is a valid configuration, silence such prints.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_main.c

index 6ffc21da14156e8ebc8bbbc1d1a1f45f84868b1b..56f6bc19cc3e6639d5c105955ca9ac94c8756ec6 100644 (file)
@@ -158,7 +158,7 @@ static int qed_init_pci(struct qed_dev *cdev,
        }
 
        cdev->pci_params.pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
-       if (cdev->pci_params.pm_cap == 0)
+       if (IS_PF(cdev) && !cdev->pci_params.pm_cap)
                DP_NOTICE(cdev, "Cannot find power management capability\n");
 
        rc = qed_set_coherency_mask(cdev);