Skip to content

Commit

Permalink
Merge tag 'pci-v5.9-fixes-2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:

 - Fix rockchip regression in rockchip_pcie_valid_device() (Lorenzo
   Pieralisi)

 - Add Pali Rohár as aardvark PCI maintainer (Pali Rohár)

* tag 'pci-v5.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  MAINTAINERS: Add Pali Rohár as aardvark PCI maintainer
  PCI: rockchip: Fix bus checks in rockchip_pcie_valid_device()
  • Loading branch information
torvalds committed Oct 2, 2020
2 parents cb6f55a + 76a6b0b commit 4d9c3a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13182,6 +13182,7 @@ F: drivers/firmware/pcdp.*

PCI DRIVER FOR AARDVARK (Marvell Armada 3700)
M: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
M: Pali Rohár <pali@kernel.org>
L: linux-pci@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
Expand Down
11 changes: 4 additions & 7 deletions drivers/pci/controller/pcie-rockchip-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4d9c3a6

Please sign in to comment.