summaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-03-05 17:52:39 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-21 06:47:07 +0200
commit94e6108803469a37ee1e3c92dafdd1d59298602f (patch)
tree7f3ee30721411cca238f8eea5971d5bebbb70a55 /drivers/pci/probe.c
parentPCI: iommu: iotlb flushing (diff)
downloadlinux-94e6108803469a37ee1e3c92dafdd1d59298602f.tar.xz
linux-94e6108803469a37ee1e3c92dafdd1d59298602f.zip
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>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 284ef392c3ea..c2e99fd87faf 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -794,6 +794,7 @@ static void pci_release_dev(struct device *dev)
struct pci_dev *pci_dev;
pci_dev = to_pci_dev(dev);
+ pci_vpd_release(pci_dev);
kfree(pci_dev);
}
@@ -933,6 +934,8 @@ pci_scan_device(struct pci_bus *bus, int devfn)
return NULL;
}
+ pci_vpd_pci22_init(dev);
+
return dev;
}