1. 07 10月, 2021 6 次提交
  2. 26 8月, 2021 1 次提交
  3. 20 8月, 2021 1 次提交
    • P
      PCI: aardvark: Configure PCIe resources from 'ranges' DT property · 64f160e1
      Pali Rohár 提交于
      In commit 6df6ba97 ("PCI: aardvark: Remove PCIe outbound window
      configuration") was removed aardvark PCIe outbound window configuration and
      commit description said that was recommended solution by HW designers.
      
      But that commit completely removed support for configuring PCIe IO
      resources without removing PCIe IO 'ranges' from DTS files. After that
      commit PCIe IO space started to be treated as PCIe MEM space and accessing
      it just caused kernel crash.
      
      Moreover implementation of PCIe outbound windows prior that commit was
      incorrect. It completely ignored offset between CPU address and PCIe bus
      address and expected that in DTS is CPU address always same as PCIe bus
      address without doing any checks. Also it completely ignored size of every
      PCIe resource specified in 'ranges' DTS property and expected that every
      PCIe resource has size 128 MB (also for PCIe IO range). Again without any
      check. Apparently none of PCIe resource has in DTS specified size of 128
      MB. So it was completely broken and thanks to how aardvark mask works,
      configuration was completely ignored.
      
      This patch reverts back support for PCIe outbound window configuration but
      implementation is a new without issues mentioned above. PCIe outbound
      window is required when DTS specify in 'ranges' property non-zero offset
      between CPU and PCIe address space. To address recommendation by HW
      designers as specified in commit description of 6df6ba97, set default
      outbound parameters as PCIe MEM access without translation and therefore
      for this PCIe 'ranges' it is not needed to configure PCIe outbound window.
      For PCIe IO space is needed to configure aardvark PCIe outbound window.
      
      This patch fixes kernel crash when trying to access PCIe IO space.
      
      Link: https://lore.kernel.org/r/20210624215546.4015-2-pali@kernel.orgSigned-off-by: NPali Rohár <pali@kernel.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: stable@vger.kernel.org # 6df6ba97 ("PCI: aardvark: Remove PCIe outbound window configuration")
      64f160e1
  4. 05 8月, 2021 3 次提交
  5. 03 8月, 2021 1 次提交
  6. 25 6月, 2021 2 次提交
  7. 18 6月, 2021 1 次提交
  8. 11 12月, 2020 1 次提交
  9. 08 12月, 2020 1 次提交
  10. 02 10月, 2020 1 次提交
  11. 07 9月, 2020 4 次提交
  12. 04 8月, 2020 2 次提交
  13. 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
  14. 23 7月, 2020 3 次提交
  15. 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
  16. 10 7月, 2020 1 次提交
  17. 07 7月, 2020 1 次提交
  18. 18 5月, 2020 7 次提交
  19. 12 5月, 2020 1 次提交
  20. 21 11月, 2019 1 次提交