]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Allow PCI express root ports to find themselves
authorThierry Reding <treding@nvidia.com>
Thu, 17 Aug 2017 11:06:14 +0000 (13:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Aug 2017 23:14:37 +0000 (16:14 -0700)
commita98220663fc12e2fe1ca46283aea5e0d7668d86a
tree29d44f8bdb6e0e9fd844b975bab9d2f6144c0aff
parentc709f16fc8b1be8c30df8c95cc9dd6ae8d2f3016
PCI: Allow PCI express root ports to find themselves

If the pci_find_pcie_root_port() function is called on a root port
itself, return the root port rather than NULL.

This effectively reverts commit e3962a2ccd0db ("PCI: fix oops when
try to find Root Port for a PCI device") which added an extra check
that would now be redundant.

Fixes: 25079de9b307 ("PCI: Disable PCIe Relaxed Ordering if unsupported")
Fixes: 69d430cc8d17 ("PCI: Turn off Request Attributes to avoid Chelsio T5 Completion erratum")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Shawn Lin <shawn.lin@rock-chips.com>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/pci/pci.c