sfc: Read VPD with pci_vpd_alloc()
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 18 Aug 2021 19:02:33 +0000 (21:02 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 20 Aug 2021 20:49:00 +0000 (15:49 -0500)
commit5119e20facfaa9f5454dd01192f3729415c7b139
treee59c3459f97d19d5cd29dbf1c54df8215bcfd06b
parent6107e5cb907cffc5576cc1297847f9fc69a8d5d9
sfc: 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 avoids having to allocate a buffer on the stack, and we don't have to
make any assumptions on VPD size and location of information in VPD.

Link: https://lore.kernel.org/r/e58f1e40-c043-0266-9a0f-e5a7f3f6883c@gmail.com
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/net/ethernet/sfc/efx.c