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
ioapic.c
iov.c PCI: Introduce pci_pcie_type(dev) to replace pci_dev->pcie_type 2012-08-23 09:40:57 -06:00
irq.c
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
msi.h
of.c
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
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
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
setup-res.c Merge branch 'pci/nikhil-big-bar-fixes' into next 2012-07-18 14:06:20 -06:00
slot.c
syscall.c
vpd.c
xen-pcifront.c Two fixes for regressions: 2012-04-06 17:54:53 -07:00