]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Expose PCI VPD through sysfs
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 5 Mar 2008 16:52:39 +0000 (16:52 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Apr 2008 04:47:07 +0000 (21:47 -0700)
commitdfcf31113b033e154045b1070f30f7fdbd22b4ca
tree7f3ee30721411cca238f8eea5971d5bebbb70a55
parent870064a88435d5d0497914167e02d74f4fffd6a9
PCI: Expose PCI VPD through sysfs

Vital Product Data (VPD) may be exposed by PCI devices in several
ways.  It is generally unsafe to read this information through the
existing interfaces to user-land because of stateful interfaces.

This adds:
- abstract operations for VPD access (struct pci_vpd_ops)
- VPD state information in struct pci_dev (struct pci_vpd)
- an implementation of the VPD access method specified in PCI 2.2
  (in access.c)
- a 'vpd' binary file in sysfs directories for PCI devices with VPD
  operations defined

It adds a probe for PCI 2.2 VPD in pci_scan_device() and release of
VPD state in pci_release_dev().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/ABI/testing/sysfs-bus-pci [new file with mode: 0644]
drivers/pci/access.c
drivers/pci/pci-sysfs.c
drivers/pci/pci.h
drivers/pci/probe.c
include/linux/pci.h