1. 11 10月, 2016 6 次提交
  2. 07 10月, 2016 1 次提交
  3. 13 9月, 2016 1 次提交
  4. 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
  5. 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
  6. 23 8月, 2016 1 次提交
  7. 18 8月, 2016 5 次提交
  8. 21 6月, 2016 3 次提交
  9. 03 5月, 2016 1 次提交
  10. 06 4月, 2016 1 次提交
    • J
      PCI: designware: Move Root Complex setup code to dw_pcie_setup_rc() · 7e57fd14
      Jisheng Zhang 提交于
      dw_pcie_host_init() looks up host bridge resources, ioremaps them, creates
      IRQ domains, and enumerates devices below the bridge.  dw_pcie_setup_rc()
      programs the Root Complex registers.  The Root Complex may lose power
      during suspend-to-RAM, and when we resume, we want to redo the latter but
      not the former.
      
      Move some Root Complex programming from dw_pcie_host_init() to
      dw_pcie_setup_rc() where it belongs.  DesignWare-based drivers can call
      dw_pcie_setup_rc() in their resume paths.
      
      [Niklas Cassel <niklas.cassel@axis.com>:  This change moves outbound ATU
      programming, which uses pp->mem_base, to dw_pcie_setup_rc().  Apply the
      dra7xx pp->mem_base update before calling dw_pcie_setup_rc().]
      
      [bhelgaas: changelog, fold in dra7xx fix from Niklas]
      Signed-off-by: NJisheng Zhang <jszhang@marvell.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
      7e57fd14
  11. 15 3月, 2016 2 次提交
  12. 10 2月, 2016 2 次提交
  13. 11 1月, 2016 1 次提交
    • B
      PCI: designware: Make config accessor override checking symmetric · 67de2dc3
      Bjorn Helgaas 提交于
      Drivers based on the DesignWare core can override the config read accessors
      by supplying rd_own_conf() and rd_other_conf() function pointers.
      dw_pcie_rd_conf() calls dw_pcie_rd_own_conf() (for accesses to the root
      bus) or dw_pcie_rd_other_conf():
      
        dw_pcie_rd_conf
          dw_pcie_rd_own_conf                # if on root bus
          dw_pcie_rd_other_conf              # if not on root bus
      
      Previously we checked for rd_other_conf() directly in dw_pcie_rd_conf(),
      but we checked for rd_own_conf() in dw_pcie_rd_own_conf().
      
      Check for rd_other_conf() in dw_pcie_rd_other_conf() to make this symmetric
      with the rd_own_conf() checking, and similarly for the write path.
      
      No functional change intended.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
      67de2dc3
  14. 06 1月, 2016 2 次提交
  15. 25 11月, 2015 1 次提交
  16. 03 11月, 2015 9 次提交
  17. 19 9月, 2015 1 次提交