Revert "bnxt: Search VPD with pci_vpd_find_ro_info_keyword()"
authorDavid S. Miller <davem@davemloft.net>
Mon, 23 Aug 2021 10:04:23 +0000 (11:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Aug 2021 10:04:23 +0000 (11:04 +0100)
This reverts commit 58a9b5d2621e725526a63847ae77b3a4c2c2bf93.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 893bdaf..9182060 100644 (file)
@@ -13195,6 +13195,12 @@ static void bnxt_vpd_read_info(struct bnxt *bp)
                goto exit;
        }
 
+       i = pci_vpd_find_tag(vpd_data, vpd_size, PCI_VPD_LRDT_RO_DATA);
+       if (i < 0) {
+               netdev_err(bp->dev, "VPD READ-Only not found\n");
+               goto exit;
+       }
+
        ro_size = pci_vpd_lrdt_size(&vpd_data[i]);
        i += PCI_VPD_LRDT_TAG_SIZE;
        if (i + ro_size > vpd_size)