tg3: Read VPD with pci_vpd_alloc()
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 18 Aug 2021 19:04:37 +0000 (21:04 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 20 Aug 2021 20:49:00 +0000 (15:49 -0500)
commitf240e15097c5004811a58f2cbc170bf90d06d0a9
treeaeb9fe27612afcd7cc184ea7df6c15c55aa8eb26
parent37838aa437c78fefd7d818f5f01a3a3950e92f40
tg3: Read VPD with pci_vpd_alloc()

Use pci_vpd_alloc() to dynamically allocate a properly sized buffer and
read the full VPD data into it.

This simplifies the code, and we no longer have to make assumptions about
VPD size.

Link: https://lore.kernel.org/r/bd3cd19c-b74f-9704-5786-476bf35ab5de@gmail.com
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/broadcom/tg3.h