aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-05 08:54:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-05 08:54:36 +0200
commit168ae5a74b4a9ebf0bd9c5ea7008af0b7a6ccf04 (patch)
treeb3d8e85dd327bd288064a43e1020b770d18db30b /drivers/pci/controller
parentMerge tag 'usb-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next (diff)
parentLinux 5.9-rc8 (diff)
downloadwireguard-linux-168ae5a74b4a9ebf0bd9c5ea7008af0b7a6ccf04.tar.xz
wireguard-linux-168ae5a74b4a9ebf0bd9c5ea7008af0b7a6ccf04.zip
Merge 5.9-rc8 into usb-next
We need the USB fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/pcie-rockchip-host.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c
index 0bb2fb3e8a0b..9705059523a6 100644
--- a/drivers/pci/controller/pcie-rockchip-host.c
+++ b/drivers/pci/controller/pcie-rockchip-host.c
@@ -71,16 +71,13 @@ static void rockchip_pcie_update_txcredit_mui(struct rockchip_pcie *rockchip)
static int rockchip_pcie_valid_device(struct rockchip_pcie *rockchip,
struct pci_bus *bus, int dev)
{
- /* access only one slot on each root port */
- if (pci_is_root_bus(bus) && dev > 0)
- return 0;
-
/*
- * do not read more than one device on the bus directly attached
+ * Access only one slot on each root port.
+ * Do not read more than one device on the bus directly attached
* to RC's downstream side.
*/
- if (pci_is_root_bus(bus->parent) && dev > 0)
- return 0;
+ if (pci_is_root_bus(bus) || pci_is_root_bus(bus->parent))
+ return dev == 0;
return 1;
}