Guest User

Untitled

a guest
Feb 25th, 2018
282
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 <[email protected]>
  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. Signed-off-by: Victor Gu <[email protected]>
  10. Reviewed-by: Wilson Ding <[email protected]>
  11. Reviewed-by: Nadav Haklai <[email protected]>
  12. [Thomas: tweak commit log.]
  13. Signed-off-by: Thomas Petazzoni <[email protected]>
  14. ---
  15. drivers/pci/host/pci-aardvark.c | 2 +-
  16. 1 file changed, 1 insertion(+), 1 deletion(-)
  17.  
  18. diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
  19. index da2881ba7737..af7a9c4a61a4 100644
  20. --- a/drivers/pci/host/pci-aardvark.c
  21. +++ b/drivers/pci/host/pci-aardvark.c
  22. @@ -459,7 +459,7 @@ static int advk_pcie_rd_conf(struct pci_bus *bus, u32 devfn,
  23. advk_writel(pcie, reg, PIO_CTRL);
  24.  
  25. /* Program the address registers */
  26. - reg = PCIE_BDF(devfn) | PCIE_CONF_REG(where);
  27. + reg = PCIE_CONF_ADDR(bus->number, devfn, where);
  28. advk_writel(pcie, reg, PIO_ADDR_LS);
  29. advk_writel(pcie, 0, PIO_ADDR_MS);
Add Comment
Please, Sign In to add comment