linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 0/4] PCI VPD access fixes
@ 2016-02-15  8:41 Hannes Reinecke
  2016-02-15  8:41 ` [PATCHv3 1/4] pci: Update VPD definitions Hannes Reinecke
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Hannes Reinecke @ 2016-02-15  8:41 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Alexander Duyck, linux-pci, Babu Moger, Jordan Hargrave,
	Hannes Reinecke

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(-)

-- 
1.8.5.6


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-22 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15  8:41 [PATCHv3 0/4] PCI VPD access fixes Hannes Reinecke
2016-02-15  8:41 ` [PATCHv3 1/4] pci: Update VPD definitions Hannes Reinecke
2016-02-15  8:42 ` [PATCHv3 2/4] pci: allow access to VPD attributes with size '0' Hannes Reinecke
2016-02-15  8:42 ` [PATCHv3 3/4] pci: Determine actual VPD size on first access Hannes Reinecke
2016-02-15  8:42 ` [PATCHv3 4/4] pci: Blacklist vpd access for buggy devices Hannes Reinecke
2016-02-22 19:57   ` Bjorn Helgaas
2016-02-16 23:50 ` [PATCHv3 0/4] PCI VPD access fixes Seymour, Shane M

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).