Skip to content

PCI/VPD: Add and use pci_read/write_vpd_any()

Heiner Kallweit linux-pci linux-tegra netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5PCI/VPD: Add pci_read/write_vpd_any()drivers/pci/vpd.c include/linux/pci.h+52 -224 replies
2/5PCI/VPD: Use pci_read_vpd_any() in pci_vpd_size()drivers/pci/vpd.c+2 -53 replies
3/5cxgb3: Remove t3_seeprom_read and use VPD APIdrivers/net/ethernet/chelsio/cxgb3/common.h drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c drivers/net/ethernet/chelsio/cxgb3/t3_hw.c+18 -640 replies
4/5cxgb3: Use VPD API in t3_seeprom_wp()drivers/net/ethernet/chelsio/cxgb3/t3_hw.c+8 -10 replies
5/5cxgb3: Remove seeprom_write and use VPD APIdrivers/net/ethernet/chelsio/cxgb3/common.h drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c drivers/net/ethernet/chelsio/cxgb3/t3_hw.c+3 -440 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJakub Kicinski
SeriesA-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] PCI/VPD: Add and use pci_read/write_vpd_any()

In certain cases we need a variant of pci_read_vpd()/pci_write_vpd() that does not check against dev->vpd.len. Such cases are:
- reading VPD if dev->vpd.len isn't set yet (in pci_vpd_size())
- devices that map non-VPD information to arbitrary places in VPD address space (example: Chelsio T3 EEPROM write-protect flag)
Therefore add function variants that check against PCI_VPD_MAX_SIZE only.

Make the cxgb3 driver the first user of the new functions.

Preferably this series should go through the PCI tree.

Heiner Kallweit (5):
PCI/VPD: Add pci_read/write_vpd_any() PCI/VPD: Use pci_read_vpd_any() in pci_vpd_size()
cxgb3: Remove t3_seeprom_read and use VPD API
cxgb3: Use VPD API in t3_seeprom_wp()
cxgb3: Remove seeprom_write and user VPD API

 drivers/net/ethernet/chelsio/cxgb3/common.h   |  2 -
 .../net/ethernet/chelsio/cxgb3/cxgb3_main.c   | 38 +++----
 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c    | 98 +++----------------
 drivers/pci/vpd.c                             | 79 ++++++++++-----
 include/linux/pci.h                           |  2 +
 5 files changed, 83 insertions(+), 136 deletions(-)
Signature · 1 line
2.33.0