linux/drivers/pci
Jiang Liu 8c0d3a02c1 PCI: Add accessors for PCI Express Capability
The PCI Express Capability (PCIe spec r3.0, sec 7.8) comes in two
versions, v1 and v2.  In v1 Capability structures (PCIe spec r1.0 and
r1.1), some fields are optional, so the structure size depends on the
device type.

This patch adds functions to access this capability so drivers don't
have to be aware of the differences between v1 and v2.  Note that these
new functions apply only to the "PCI Express Capability," not to any of
the other "PCI Express Extended Capabilities" (AER, VC, ACS, MFVC, etc.)

Function pcie_capability_read_word/dword() reads the PCIe Capabilities
register and returns the value in the reference parameter "val".  If
the PCIe Capabilities register is not implemented on the PCIe device,
"val" is set to 0.

Function pcie_capability_write_word/dword() writes the value to the
specified PCIe Capability register.

Function pcie_capability_clear_and_set_word/dword() sets and/or clears bits
of a PCIe Capability register.

[bhelgaas: changelog, drop "pci_" prefixes, don't export
pcie_capability_reg_implemented()]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2012-08-23 09:41:20 -06:00
..
hotplug PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
pcie PCI: Introduce pci_pcie_type(dev) to replace pci_dev->pcie_type 2012-08-23 09:40:57 -06:00
.gitignore
access.c PCI: Add accessors for PCI Express Capability 2012-08-23 09:41:20 -06:00
ats.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
bus.c PCI: fix undefined reference to 'pci_fixup_final_inited' 2012-07-16 09:14:49 -06:00
host-bridge.c PCI: add host bridge release support 2012-04-30 14:52:43 -06:00
hotplug-pci.c PCI: hotplug: remove pci_do_scan_bus() 2012-06-13 15:42:27 -06:00
hotplug.c
htirq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
ioapic.c pci, x86/io-apic: Allow PCI_IOAPIC to be user configurable on x86 2011-12-06 09:21:05 +01:00
iov.c PCI: Introduce pci_pcie_type(dev) to replace pci_dev->pcie_type 2012-08-23 09:40:57 -06:00
irq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
Kconfig PCI: add a PCI resource reallocation config option 2012-02-24 09:38:59 -08:00
Makefile PCI: build resource code for M68K architecture 2012-07-13 09:40:37 -06:00
msi.c x86/PCI: Expand the x86_msi_ops to have a restore MSIs. 2012-01-06 14:02:26 -08:00
msi.h
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c Merge branch 'topic/huang-d3cold-v7' into next 2012-06-23 11:59:43 -06:00
pci-driver.c PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
pci-label.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
pci-stub.c
pci-sysfs.c Merge branch 'topic/huang-d3cold-v7' into next 2012-06-23 11:59:43 -06:00
pci.c PCI: Introduce pci_pcie_type(dev) to replace pci_dev->pcie_type 2012-08-23 09:40:57 -06:00
pci.h Merge branch 'pci/rafael-pci_set_power_state-rebase' into next 2012-07-05 16:29:52 -06:00
probe.c PCI: Remove unused field pcie_type from struct pci_dev 2012-08-23 09:41:05 -06:00
proc.c
quirks.c PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
remove.c PCI: release busn_res when removing bus 2012-06-13 15:42:22 -06:00
rom.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
search.c PCI: Introduce pci_pcie_type(dev) to replace pci_dev->pcie_type 2012-08-23 09:40:57 -06:00
setup-bus.c PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
setup-irq.c PCI: Make the struct pci_dev * argument of pci_fixup_irqs const. 2011-07-22 08:26:06 -07:00
setup-res.c Merge branch 'pci/nikhil-big-bar-fixes' into next 2012-07-18 14:06:20 -06:00
slot.c pci: add module.h to files implicitly relying on its presence. 2011-10-31 19:31:23 -04:00
syscall.c
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c Two fixes for regressions: 2012-04-06 17:54:53 -07:00