Skip to content

PCI/VPD: Extend PCI VPD API

Heiner Kallweit linux-pci netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8PCI/VPD: Add pci_vpd_allocdrivers/pci/vpd.c include/linux/pci.h+35 -00 replies
2/8PCI/VPD: Add pci_vpd_find_ro_info_keyword and pci_vpd_check_csumdrivers/pci/vpd.c include/linux/pci.h+77 -00 replies
3/8PCI/VPD: Add missing VPD RO field keywordsinclude/linux/pci.h+2 -00 replies
4/8sfc: Use new function pci_vpd_allocdrivers/net/ethernet/sfc/efx.c+14 -150 replies
5/8sfc: Use new VPD API function pci_vpd_find_ro_info_keyworddrivers/net/ethernet/sfc/efx.c+14 -510 replies
6/8tg3: Use new function pci_vpd_allocdrivers/net/ethernet/broadcom/tg3.c drivers/net/ethernet/broadcom/tg3.h+10 -180 replies
7/8tg3: Use new function pci_vpd_check_csumdrivers/net/ethernet/broadcom/tg3.c+4 -270 replies
8/8tg3: Use new function pci_vpd_find_ro_info_keyworddrivers/net/ethernet/broadcom/tg3.c+16 -430 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] PCI/VPD: Extend PCI VPD API

This series adds three functions to the PCI VPD API that help to simplify driver code. First users are sfc and tg3 drivers because I have test hw. The other users of the VPD API will benefit from a migration as well.
I'd propose to apply this series via the PCI tree.

Added API calls:

pci_vpd_alloc()
Dynamically allocates a properly sized buffer and reads the VPD into it.

pci_vpd_find_ro_info_keyword()
Locates an info field keyword in the VPD RO section. pci_vpd_find_info_keyword() can be removed once all users have been migrated.

pci_vpd_check_csum()
Check VPD checksum based on algorithm defined in the PCI specification.

Tested on a SFN6122F and a BCM95719 card.

Heiner Kallweit (8):
PCI/VPD: Add pci_vpd_alloc
PCI/VPD: Add pci_vpd_find_ro_info_keyword and pci_vpd_check_csum PCI/VPD: Add missing VPD RO field keywords
sfc: Use new function pci_vpd_alloc
sfc: Use new VPD API function pci_vpd_find_ro_info_keyword
tg3: Use new function pci_vpd_alloc
tg3: Use new function pci_vpd_check_csum
tg3: Use new function pci_vpd_find_ro_info_keyword

 drivers/net/ethernet/broadcom/tg3.c | 115 +++++++---------------------
 drivers/net/ethernet/broadcom/tg3.h |   1 -
 drivers/net/ethernet/sfc/efx.c      |  78 +++++--------------
 drivers/pci/vpd.c                   |  82 ++++++++++++++++++++
 include/linux/pci.h                 |  32 ++++++++
 5 files changed, 163 insertions(+), 145 deletions(-)
Signature · 1 line
2.32.0