]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: Read VPD with pci_vpd_alloc()
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 22 Aug 2021 13:53:23 +0000 (15:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Aug 2021 20:45:39 +0000 (21:45 +0100)
commit1c2f26ee898243e3e4dc35924ed006a265bfbd16
tree36eec7cbf16df50afba2af881c1445454d073ec6
parent9fce9e7fd9d4d937f33eda7023463c8ac1c2d4d3
bnx2x: 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.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c