bnxt_en: Read VPD info only for PFs
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Tue, 23 Jun 2020 23:01:38 +0000 (19:01 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 03:13:58 +0000 (20:13 -0700)
Virtual functions does not have VPD information. This patch modifies
calling bnxt_read_vpd_info() only for PFs and avoids an unnecessary
error log.

Fixes: a0d0fd70fed5 ("bnxt_en: Read partno and serialno of the board from VPD")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 6dc7cc4df9e8af6c5fc875a940a457a4244125af..6a884df44612aa4b0779e7d9747990b48e71d563 100644 (file)
@@ -11913,7 +11913,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        dev->ethtool_ops = &bnxt_ethtool_ops;
        pci_set_drvdata(pdev, dev);
 
-       bnxt_vpd_read_info(bp);
+       if (BNXT_PF(bp))
+               bnxt_vpd_read_info(bp);
 
        rc = bnxt_alloc_hwrm_resources(bp);
        if (rc)