Guest User

Untitled

a guest
Feb 25th, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. From: Victor Gu <xigu@marvell.com>
  2.  
  3. When setting the PIO_ADDR_LS register during a configuration read, we
  4. were properly passing the device number, function number and register
  5. number, but not the bus number, causing issues when reading the
  6. configuration of PCIe devices.
  7.  
  8. Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver")
  9. Cc: <stable@vger.kernel.org>
  10. Signed-off-by: Victor Gu <xigu@marvell.com>
  11. Reviewed-by: Wilson Ding <dingwei@marvell.com>
  12. Reviewed-by: Nadav Haklai <nadavh@marvell.com>
  13. [Thomas: tweak commit log.]
  14. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  15. ---
  16. drivers/pci/host/pci-aardvark.c | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18.  
  19. diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
  20. index da2881ba7737..af7a9c4a61a4 100644
  21. --- a/drivers/pci/host/pci-aardvark.c
  22. +++ b/drivers/pci/host/pci-aardvark.c
  23. @@ -459,7 +459,7 @@ static int advk_pcie_rd_conf(struct pci_bus *bus, u32 devfn,
  24. advk_writel(pcie, reg, PIO_CTRL);
  25.  
  26. /* Program the address registers */
  27. - reg = PCIE_BDF(devfn) | PCIE_CONF_REG(where);
  28. + reg = PCIE_CONF_ADDR(bus->number, devfn, where);
  29. advk_writel(pcie, reg, PIO_ADDR_LS);
  30. advk_writel(pcie, 0, PIO_ADDR_MS);
Add Comment
Please, Sign In to add comment