linux/drivers/pci
Bjorn Helgaas ffb4d60262 PCI: Add pcie_downstream_port() (true for Root and Switch Downstream Ports)
As used in the PCIe spec, "Downstream Port" includes both Root Ports and
Switch Downstream Ports.  We sometimes checked for PCI_EXP_TYPE_DOWNSTREAM
when we should have checked for PCI_EXP_TYPE_ROOT_PORT or
PCI_EXP_TYPE_DOWNSTREAM.

For a Root Port without a slot, the effect of this was that using
pcie_capability_read_word() to read PCI_EXP_SLTSTA returned zero instead of
showing the Presence Detect State bit hardwired to one as the PCIe Spec,
r3.0, sec 7.8, requires.  (This read is completed in software because
previous PCIe spec versions didn't require PCI_EXP_SLTSTA to exist at all.)

Nothing in the kernel currently depends on this (pciehp only reads
PCI_EXP_SLTSTA on ports with slots), so this is a cleanup and not a
functional change.

Add a pcie_downstream_port() helper function and use it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-14 17:39:32 -05:00
..
host Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
hotplug PCI: pciehp: Inline the "handle event" functions into the ISR 2015-06-18 16:14:49 -05:00
pcie PCI: Fix pcie_port_device_resume() comment 2015-07-14 13:41:04 -05:00
access.c PCI: Add pcie_downstream_port() (true for Root and Switch Downstream Ports) 2015-07-14 17:39:32 -05:00
ats.c PCI: Removed unused parts of Page Request Interface support 2014-01-10 14:00:47 -07:00
bus.c PCI: Add pci_bus_addr_t 2015-05-29 17:21:45 -05:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c PCI: Remove unnecessary __ref annotations 2014-04-29 17:36:44 -06:00
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c PCI: Add pcibios_iov_resource_alignment() interface 2015-03-31 13:02:36 +11:00
irq.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Kconfig PCI: Add pci_bus_addr_t 2015-05-29 17:21:45 -05:00
Makefile PCI: Remove PCI ioapic driver 2014-12-16 14:08:14 +01:00
msi.c PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI 2015-05-07 09:52:21 -05:00
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c ACPI / PM: Rework device power management to follow ACPI 6 2015-05-16 01:55:35 +02:00
pci-driver.c ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
pci-label.c PCI: Make a shareable UUID for PCI firmware ACPI _DSM 2015-04-08 14:39:30 -05:00
pci-stub.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-sysfs.c PCI: Don't read past the end of sysfs "driver_override" buffer 2015-02-24 17:35:37 -06:00
pci.c Merge branches 'pci/aspm', 'pci/enumeration', 'pci/hotplug', 'pci/misc', 'pci/msi', 'pci/resource' and 'pci/virtualization' into next 2015-06-12 15:26:45 -05:00
pci.h Merge branches 'pci/aspm', 'pci/enumeration', 'pci/hotplug', 'pci/misc', 'pci/msi', 'pci/resource' and 'pci/virtualization' into next 2015-06-12 15:26:45 -05:00
probe.c PCI: Shift PCI_CLASS_NOT_DEFINED consistently with other classes 2015-07-14 13:40:39 -05:00
proc.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
quirks.c PCI: Shift PCI_CLASS_NOT_DEFINED consistently with other classes 2015-07-14 13:40:39 -05:00
remove.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
rom.c PCI: Fix infinite loop with ROM image of size 0 2015-01-23 17:42:59 -06:00
search.c PCI: Delete unnecessary NULL pointer checks 2014-11-10 21:02:17 -07:00
setup-bus.c PCI: Preserve resource size during alignment reordering 2015-06-01 17:56:32 -05:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Mark invalid BARs as unassigned 2015-03-12 18:52:12 -05:00
slot.c VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms. 2014-03-24 12:21:00 +10:30
syscall.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
vc.c PCI: Use dev->has_secondary_link to find downstream PCIe links 2015-05-29 15:35:26 -05:00
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c xen: features and cleanups for 4.2-rc0 2015-07-01 11:53:46 -07:00