Skip to content

PCI VPD access fixes

Hannes Reinecke linux-pci 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 2 repliesIn review
  2. v24 patches 26 repliesSuperseded
  3. v13 patches 4 repliesSuperseded

Changes to v2 from the cover letter

- Spelling fixes as suggested by Bjorn Helgaas
- Update to correct vpd size in pci_vpc_pci22_write
- Pass in modified VPD size to pci_vpd_pci22_size() to make quirk_brcm_570x_limit_vpd work

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4pci: Update VPD definitionsinclude/linux/pci.h+25 -20 replies
2/4pci: allow access to VPD attributes with size '0'drivers/pci/pci-sysfs.c+12 -80 replies
3/4pci: Determine actual VPD size on first accessdrivers/pci/access.c drivers/pci/pci-sysfs.c+82 -40 replies
4/4pci: Blacklist vpd access for buggy devicesdrivers/pci/access.c drivers/pci/quirks.c+45 -21 reply

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchShane Seymour
SeriesT-b
1/4
2/4
3/4
4/4

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

Read the v3 thread

Cover letter [PATCHv3 0/4] PCI VPD access fixes

the current PCI VPD page access assumes that the entire possible VPD data is readable. However, the spec only guarantees a VPD data up to the 'end' marker, with everything beyond that being undefined. This causes a system lockup on certain devices.

With this patch we always set the VPD sysfs attribute size to '0', and calculate the available VPD size on the first access.
If no valid data can be read an I/O error is returned.

I've also included the patch from Babu to blacklists devices which are known to lockup when accessing the VPD data.

Changes to v2:
- Spelling fixes as suggested by Bjorn Helgaas
- Update to correct vpd size in pci_vpc_pci22_write
- Pass in modified VPD size to pci_vpd_pci22_size() to make quirk_brcm_570x_limit_vpd work

Babu Moger (1):
pci: Blacklist vpd access for buggy devices

Hannes Reinecke (3):
pci: Update VPD definitions
pci: allow access to VPD attributes with size '0'
pci: Determine actual VPD size on first access

 drivers/pci/access.c    | 84 +++++++++++++++++++++++++++++++++++++++++++++++--
 drivers/pci/pci-sysfs.c | 22 +++++++------
 drivers/pci/quirks.c    | 43 +++++++++++++++++++++++++
 include/linux/pci.h     | 27 ++++++++++++++--
 4 files changed, 162 insertions(+), 14 deletions(-)
Signature · 1 line
1.8.5.6