summaryrefslogtreecommitdiffstats
path: root/drivers/pci/xen-pcifront.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2015-06-24 23:05:54 +0200
committerBjorn Helgaas <bhelgaas@google.com>2015-07-15 00:39:32 +0200
commitffb4d602623aef9eb813a35b87b20854c030a2ec (patch)
tree3ea640404450d7799af06383025f652f884ead8b /drivers/pci/xen-pcifront.c
parentPCI: Fix pcie_port_device_resume() comment (diff)
downloadlinux-ffb4d602623aef9eb813a35b87b20854c030a2ec.tar.xz
linux-ffb4d602623aef9eb813a35b87b20854c030a2ec.zip
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>
Diffstat (limited to 'drivers/pci/xen-pcifront.c')
0 files changed, 0 insertions, 0 deletions