1. 07 9月, 2020 2 次提交
  2. 04 8月, 2020 2 次提交
  3. 24 7月, 2020 1 次提交
    • R
      PCI: Move setting pci_host_bridge.busnr out of host drivers · 4f5c883d
      Rob Herring 提交于
      Most host drivers only parse the DT bus range to set the root bus number
      in pci_host_bridge.busnr. The ones that don't set busnr are buggy in
      that they ignore what's in DT. Let's set busnr in pci_scan_root_bus_bridge()
      where we already check for the bus resource and remove setting it in
      host drivers.
      
      Link: https://lore.kernel.org/r/20200722022514.1283916-12-robh@kernel.orgSigned-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Jingoo Han <jingoohan1@gmail.com>
      Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Ryder Lee <ryder.lee@mediatek.com>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: linux-tegra@vger.kernel.org
      Cc: linux-mediatek@lists.infradead.org
      Cc: linux-renesas-soc@vger.kernel.org
      4f5c883d
  4. 23 7月, 2020 3 次提交
  5. 21 7月, 2020 1 次提交
    • P
      PCI: aardvark: Don't touch PCIe registers if no card connected · 70e38025
      Pali Rohár 提交于
      When there is no PCIe card connected and advk_pcie_rd_conf() or
      advk_pcie_wr_conf() is called for PCI bus which doesn't belong to emulated
      root bridge, the aardvark driver throws the following error message:
      
        advk-pcie d0070000.pcie: config read/write timed out
      
      Obviously accessing PCIe registers of disconnected card is not possible.
      
      Extend check in advk_pcie_valid_device() function for validating
      availability of PCIe bus. If PCIe link is down, then the device is marked
      as Not Found and the driver does not try to access these registers.
      
      This is just an optimization to prevent accessing PCIe registers when card
      is disconnected. Trying to access PCIe registers of disconnected card does
      not cause any crash, kernel just needs to wait for a timeout. So if card
      disappear immediately after checking for PCIe link (before accessing PCIe
      registers), it does not cause any problems.
      
      Link: https://lore.kernel.org/r/20200702083036.12230-1-pali@kernel.orgSigned-off-by: NPali Rohár <pali@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      70e38025
  6. 10 7月, 2020 1 次提交
  7. 07 7月, 2020 1 次提交
  8. 18 5月, 2020 7 次提交
  9. 12 5月, 2020 1 次提交
  10. 21 11月, 2019 2 次提交
  11. 29 10月, 2019 1 次提交
  12. 17 10月, 2019 1 次提交
  13. 15 10月, 2019 4 次提交
  14. 09 7月, 2019 1 次提交
  15. 01 4月, 2019 1 次提交
    • W
      PCI: aardvark: Fix a leaked reference by adding missing of_node_put() · 3842f516
      Wen Yang 提交于
      The call to of_get_next_child() returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      irq_domain_add_linear() also calls of_node_get() to increase refcount,
      so irq_domain will not be affected when it is released.
      
      Detected by coccinelle with the following warnings:
        ./drivers/pci/controller/pci-aardvark.c:826:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 798, but without a corresponding object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: linux-pci@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      3842f516
  16. 01 3月, 2019 1 次提交
  17. 22 2月, 2019 1 次提交
  18. 19 10月, 2018 1 次提交
  19. 19 7月, 2018 1 次提交
    • S
      PCI: aardvark: Fix I/O space page leak · 1df3e5b3
      Sergei Shtylyov 提交于
      When testing the R-Car PCIe driver on the Condor board, if the PCIe PHY
      driver was left disabled, the kernel crashed with this BUG:
      
        kernel BUG at lib/ioremap.c:72!
        Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
        Modules linked in:
        CPU: 0 PID: 39 Comm: kworker/0:1 Not tainted 4.17.0-dirty #1092
        Hardware name: Renesas Condor board based on r8a77980 (DT)
        Workqueue: events deferred_probe_work_func
        pstate: 80000005 (Nzcv daif -PAN -UAO)
        pc : ioremap_page_range+0x370/0x3c8
        lr : ioremap_page_range+0x40/0x3c8
        sp : ffff000008da39e0
        x29: ffff000008da39e0 x28: 00e8000000000f07
        x27: ffff7dfffee00000 x26: 0140000000000000
        x25: ffff7dfffef00000 x24: 00000000000fe100
        x23: ffff80007b906000 x22: ffff000008ab8000
        x21: ffff000008bb1d58 x20: ffff7dfffef00000
        x19: ffff800009c30fb8 x18: 0000000000000001
        x17: 00000000000152d0 x16: 00000000014012d0
        x15: 0000000000000000 x14: 0720072007200720
        x13: 0720072007200720 x12: 0720072007200720
        x11: 0720072007300730 x10: 00000000000000ae
        x9 : 0000000000000000 x8 : ffff7dffff000000
        x7 : 0000000000000000 x6 : 0000000000000100
        x5 : 0000000000000000 x4 : 000000007b906000
        x3 : ffff80007c61a880 x2 : ffff7dfffeefffff
        x1 : 0000000040000000 x0 : 00e80000fe100f07
        Process kworker/0:1 (pid: 39, stack limit = 0x        (ptrval))
        Call trace:
         ioremap_page_range+0x370/0x3c8
         pci_remap_iospace+0x7c/0xac
         pci_parse_request_of_pci_ranges+0x13c/0x190
         rcar_pcie_probe+0x4c/0xb04
         platform_drv_probe+0x50/0xbc
         driver_probe_device+0x21c/0x308
         __device_attach_driver+0x98/0xc8
         bus_for_each_drv+0x54/0x94
         __device_attach+0xc4/0x12c
         device_initial_probe+0x10/0x18
         bus_probe_device+0x90/0x98
         deferred_probe_work_func+0xb0/0x150
         process_one_work+0x12c/0x29c
         worker_thread+0x200/0x3fc
         kthread+0x108/0x134
         ret_from_fork+0x10/0x18
        Code: f9004ba2 54000080 aa0003fb 17ffff48 (d4210000)
      
      It turned out that pci_remap_iospace() wasn't undone when the driver's
      probe failed, and since devm_phy_optional_get() returned -EPROBE_DEFER,
      the probe was retried, finally causing the BUG due to trying to remap
      already remapped pages.
      
      The Aardvark PCI controller driver has the same issue.
      Replace pci_remap_iospace() with its devm_ managed version to fix the bug.
      
      Fixes: 8c39d710 ("PCI: aardvark: Add Aardvark PCI host controller driver")
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      [lorenzo.pieralisi@arm.com: updated the commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      1df3e5b3
  20. 06 7月, 2018 2 次提交
  21. 28 6月, 2018 2 次提交
  22. 08 6月, 2018 1 次提交
  23. 31 5月, 2018 2 次提交