1. 02 9月, 2017 1 次提交
  2. 30 8月, 2017 1 次提交
  3. 23 8月, 2017 1 次提交
  4. 04 8月, 2017 1 次提交
  5. 03 7月, 2017 2 次提交
  6. 25 4月, 2017 1 次提交
  7. 04 4月, 2017 2 次提交
  8. 22 2月, 2017 8 次提交
  9. 10 1月, 2017 1 次提交
    • M
      PCI: designware: Check for iATU unroll only on platforms that use ATU · a782b5f9
      Murali Karicheri 提交于
      Previously we checked for iATU unroll support by reading PCIE_ATU_VIEWPORT
      even on platforms, e.g., Keystone, that do not have ATU ports.  This can
      cause bad behavior such as asynchronous external aborts:
      
        OF: PCI:   MEM 0x60000000..0x6fffffff -> 0x60000000
        Unhandled fault: asynchronous external abort (0x1211) at 0x00000000
        pgd = c0003000
        [00000000] *pgd=80000800004003, *pmd=00000000
        Internal error: : 1211 [#1] PREEMPT SMP ARM
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-00009-g6ff59d2-dirty #7
        Hardware name: Keystone
        task: eb878000 task.stack: eb866000
        PC is at dw_pcie_setup_rc+0x24/0x380
        LR is at ks_pcie_host_init+0x10/0x170
      
      Move the dw_pcie_iatu_unroll_enabled() check so we only call it on
      platforms that do not use the ATU.  These platforms supply their own
      ->rd_other_conf() and ->wr_other_conf() methods.
      
      [bhelgaas: changelog]
      Fixes: a0601a47 ("PCI: designware: Add iATU Unroll feature")
      Fixes: 416379f9 ("PCI: designware: Check for iATU unroll support after initializing host")
      Tested-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-By: NJoao Pinto <jpinto@synopsys.com>
      CC: stable@vger.kernel.org	# v4.9+
      a782b5f9
  10. 05 11月, 2016 1 次提交
  11. 11 10月, 2016 6 次提交
  12. 07 10月, 2016 1 次提交
  13. 13 9月, 2016 1 次提交
  14. 07 9月, 2016 1 次提交
    • L
      PCI: designware: Fix pci_remap_iospace() failure path · bcd7b718
      Lorenzo Pieralisi 提交于
      On ARM/ARM64 architectures, PCI IO ports are emulated through memory mapped
      IO, by reserving a chunk of virtual address space starting at PCI_IOBASE
      and by mapping the PCI host bridges memory address space driving PCI IO
      cycles to it.
      
      PCI host bridge drivers that enable downstream PCI IO cycles map the host
      bridge memory address responding to PCI IO cycles to the fixed virtual
      address space through the pci_remap_iospace() API.
      
      This means that if the pci_remap_iospace() function fails, the
      corresponding host bridge PCI IO resource must be considered invalid, in
      that there is no way for the kernel to actually drive PCI IO transactions
      if the memory addresses responding to PCI IO cycles cannot be mapped into
      the CPU virtual address space.
      
      The PCI designware host bridge driver does not remove the PCI IO resource
      from the host bridge resource windows if the pci_remap_iospace() call
      fails; this is an actual bug in that the PCI host bridge would consider the
      PCI IO resource valid (and possibly assign it to downstream devices) even
      if the kernel was not able to map the PCI host bridge memory address
      driving IO cycle to the CPU virtual address space (ie pci_remap_iospace()
      failures).
      
      Fix the PCI host bridge driver pci_remap_iospace() failure path, by
      destroying the PCI host bridge PCI IO resources retrieved through firmware
      when the pci_remap_iospace() function call fails, therefore preventing the
      kernel from adding the respective PCI IO resource to the list of PCI host
      bridge valid resources, fixing the issue.
      
      Fixes: cbce7900 ("PCI: designware: Make driver arch-agnostic")
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Jingoo Han <jingoohan1@gmail.com>
      CC: Pratyush Anand <pratyush.anand@gmail.com>
      bcd7b718
  15. 24 8月, 2016 2 次提交
    • D
      PCI: designware: Exchange viewport of `MEMORYs' and `CFGs/IOs' · 68a0bfec
      Dong Bo 提交于
      When we have only two view ports in a DesignWare PCIe platform, iatu0
      is used for both CFG and IO accesses.  When CFGs are sent to peripherals
      (e.g., lspci), iatu0 frequently switches between CFG and IO.
      
      For such scenarios, a MEMORY might be sent as an IOs by mistake.
      Considering the following configurations:
      
        MEMORY  ->   BASE_ADDR: 0xb4100000, LIMIT: 0xb4100FFF, TYPE=mem
        CFG     ->   BASE_ADDR: 0xb4000000, LIMIT: 0xb4000FFF, TYPE=cfg
        IO      ->   BASE_ADDR: 0xFFFFFFFF, LIMIT: 0xFFFFFFFE, TYPE=io
      
      Suppose PCIe has just completed a CFG access.  To switch back to IO, it
      sets the BASE_ADDR to 0xFFFFFFFF, LIMIT 0xFFFFFFFE and TYPE to IO.  When
      another CFG comes, the BASE_ADDR is set to 0xb4000000 to switch to CFG.  At
      this moment, a MEMORY access shows up, since it matches with iatu0 (due to
      0xb4000000 <= MEMORY BASE_ADDR <= MEMORY LIMIT <= 0xFFFFFFF), it is treated
      as an IO access by mistake, then sent to perpheral.
      
      This patch fixes the problem by exchanging the assignments of `MEMORYs' and
      `CFGs/IOs', which assigning MEMORYs to iatu0, CFGs and IOs to iatu1.
      
      We can still have issues with IO transfer, however memory transfer is used
      predominantly therefore we are just minimizing the risk of failure.
      Actually, we can not do much when we have only two viewports.  We can
      either not allow the less frequent IO transfers at all, or can live with a
      remote possibility of getting it corrupted.
      Signed-off-by: NDong Bo <dongbo4@huawei.com>
      [pratyush.anand@gmail.com: Modified commit log to capture remote risk]
      Signed-off-by: NPratyush Anand <pratyush.anand@gmail.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      68a0bfec
    • P
      PCI: designware: Make explicitly non-modular · e41faf07
      Paul Gortmaker 提交于
      This code is not being built as a module by anyone:
      
        drivers/pci/host/Kconfig:config PCIE_DW
        drivers/pci/host/Kconfig:  bool
      
      Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(),
      etc., so that when reading the driver there is no doubt it is builtin-only.
      The information is preserved in comments at the top of the file.
      
      [bhelgaas: changelog]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Jingoo Han <jingoohan1@gmail.com>
      CC: Pratyush Anand <pratyush.anand@gmail.com>
      e41faf07
  16. 23 8月, 2016 1 次提交
  17. 18 8月, 2016 5 次提交
  18. 21 6月, 2016 3 次提交
  19. 03 5月, 2016 1 次提交