1. 31 Jan, 2018 10 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/msi' into next · 11377725
      Bjorn Helgaas authored
      * pci/msi:
        PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode
      11377725
    • Bjorn Helgaas's avatar
      Merge branch 'pci/misc' into next · 412ee7cd
      Bjorn Helgaas authored
      * pci/misc:
        PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build
        PCI: Add wrappers for dev_printk()
        PCI: Remove unnecessary messages for memory allocation failures
        PCI: Add #defines for Completion Timeout Disable feature
        hinic: Replace PCI pool old API
        net: e100: Replace PCI pool old API
        block: DAC960: Replace PCI pool old API
        MAINTAINERS: Include more PCI files
        PCI: Remove unneeded kallsyms include
        powerpc/pci: Unroll two pass loop when scanning bridges
        powerpc/pci: Use for_each_pci_bridge() helper
      412ee7cd
    • Bjorn Helgaas's avatar
      Merge branch 'pci/hotplug' into next · 85d24b3f
      Bjorn Helgaas authored
      * pci/hotplug:
        PCI: pciehp: Assume NoCompl+ for Thunderbolt ports
        PCI: hotplug: Drop checking of PCI_BRIDGE_CONTROL in *_unconfigure_device()
      85d24b3f
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' into next · 5be31686
      Bjorn Helgaas authored
      * pci/enumeration:
        RDMA/qedr: Use pci_enable_atomic_ops_to_root()
        PCI: Add pci_enable_atomic_ops_to_root()
        PCI: Make PCI_SCAN_ALL_PCIE_DEVS work for Root as well as Downstream Ports
      5be31686
    • Bjorn Helgaas's avatar
      Merge branch 'pci/dt-resources' into next · 6b290397
      Bjorn Helgaas authored
      * pci/dt-resources:
        PCI: Make of_irq_parse_pci() static
        powerpc/pci: Use of_irq_parse_and_map_pci() helper
        PCI: Move OF-related PCI functions into PCI core
      6b290397
    • Bjorn Helgaas's avatar
      Merge branch 'pci/dpc' into next · 3972b0e2
      Bjorn Helgaas authored
      * pci/dpc:
        PCI/DPC: Reformat DPC register definitions
        PCI/DPC: Add and use DPC Status register field definitions
        PCI/DPC: Squash dpc_rp_pio_get_info() into dpc_process_rp_pio_error()
        PCI/DPC: Remove unnecessary RP PIO register structs
        PCI/DPC: Push dpc->rp_pio_status assignment into dpc_rp_pio_get_info()
        PCI/DPC: Squash dpc_rp_pio_print_error() into dpc_rp_pio_get_info()
        PCI/DPC: Make RP PIO log size check more generic
        PCI/DPC: Rename local "status" to "dpc_status"
        PCI/DPC: Squash dpc_rp_pio_print_tlp_header() into dpc_rp_pio_print_error()
        PCI/DPC: Process RP PIO details only if RP PIO extensions supported
        PCI/DPC: Read RP PIO Log Size once at probe
        PCI/DPC: Rename struct dpc_dev.rp to rp_extensions
        PCI/DPC: Add local variable for DPC capability offset
        PCI/DPC: Rename interrupt_event_handler() to dpc_work()
        PCI/DPC: Fix interrupt message number print
        PCI/DPC: Enable DPC only if AER is available
        PCI/DPC: Fix shared interrupt handling
      3972b0e2
    • Bjorn Helgaas's avatar
      Merge branch 'pci/dma' into next · ac7ab8a6
      Bjorn Helgaas authored
      * pci/dma:
        PCI: Remove NULL device handling from PCI DMA API
        net: tsi108: Use DMA API properly
        media: ttusb-dec: Remove pci_zalloc_coherent() abuse
        media: ttusb-budget: Remove pci_zalloc_coherent() abuse
      ac7ab8a6
    • Bjorn Helgaas's avatar
      Merge branch 'pci/deprecate-get-bus-and-slot' into next · b0b7f9cd
      Bjorn Helgaas authored
      * pci/deprecate-get-bus-and-slot:
        video: fbdev: riva: deprecate pci_get_bus_and_slot()
        video: fbdev: nvidia: deprecate pci_get_bus_and_slot()
        video: fbdev: intelfb: deprecate pci_get_bus_and_slot()
        openprom: Deprecate pci_get_bus_and_slot()
        xen/pcifront: Deprecate pci_get_bus_and_slot()
        PCI: Deprecate pci_get_bus_and_slot()
        PCI: ibmphp: Deprecate pci_get_bus_and_slot()
        PCI: cpqhp: Deprecate pci_get_bus_and_slot()
        pch_gbe: Deprecate pci_get_bus_and_slot()
        bnx2x: Deprecate pci_get_bus_and_slot()
        powerpc/via-pmu: Deprecate pci_get_bus_and_slot()
        iommu/amd: Deprecate pci_get_bus_and_slot()
        sl82c105: deprecate pci_get_bus_and_slot()
        drm/nouveau: deprecate pci_get_bus_and_slot()
        drm/gma500: Deprecate pci_get_bus_and_slot()
        ibft: Deprecate pci_get_bus_and_slot()
        edd: Deprecate pci_get_bus_and_slot()
        agp: sworks: Deprecate pci_get_bus_and_slot()
        agp: nvidia: Deprecate pci_get_bus_and_slot()
        ata: Deprecate pci_get_bus_and_slot()
        x86/PCI: Deprecate pci_get_bus_and_slot()
        powerpc/PCI: Deprecate pci_get_bus_and_slot()
        alpha/PCI: Deprecate pci_get_bus_and_slot()
      b0b7f9cd
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aspm' into next · 3ea8bc33
      Bjorn Helgaas authored
      * pci/aspm:
        PCI/ASPM: Unexport internal ASPM interfaces
        PCI/ASPM: Enable Latency Tolerance Reporting when supported
        PCI/ASPM: Calculate LTR_L1.2_THRESHOLD from device characteristics
      3ea8bc33
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aer' into next · 86e99150
      Bjorn Helgaas authored
      * pci/aer:
        PCI/AER: Return error if AER is not supported
        PCI/AER: Skip recovery callbacks for correctable errors from ACPI APEI
      86e99150
  2. 30 Jan, 2018 13 commits
  3. 26 Jan, 2018 3 commits
  4. 25 Jan, 2018 1 commit
  5. 24 Jan, 2018 1 commit
  6. 23 Jan, 2018 2 commits
    • Jay Cornwall's avatar
      PCI: Add pci_enable_atomic_ops_to_root() · 430a2368
      Jay Cornwall authored
      The Atomic Operations feature (PCIe r4.0, sec 6.15) allows atomic
      transctions to be requested by, routed through and completed by PCIe
      components. Routing and completion do not require software support.
      Component support for each is detectable via the DEVCAP2 register.
      
      A Requester may use AtomicOps only if its PCI_EXP_DEVCTL2_ATOMIC_REQ is
      set. This should be set only if the Completer and all intermediate routing
      elements support AtomicOps.
      
      A concrete example is the AMD Fiji-class GPU (which is capable of making
      AtomicOp requests), below a PLX 8747 switch (advertising AtomicOp routing)
      with a Haswell host bridge (advertising AtomicOp completion support).
      
      Add pci_enable_atomic_ops_to_root() for per-device control over AtomicOp
      requests. This checks to be sure the Root Port supports completion of the
      desired AtomicOp sizes and the path to the Root Port supports routing the
      AtomicOps.
      Signed-off-by: default avatarJay Cornwall <Jay.Cornwall@amd.com>
      Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      [bhelgaas: changelog, comments, whitespace]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      430a2368
    • Lukas Wunner's avatar
      PCI: pciehp: Assume NoCompl+ for Thunderbolt ports · 493fb50e
      Lukas Wunner authored
      Certain Thunderbolt 1 controllers claim to support Command Completed events
      (value of 0b in the No Command Completed Support field of the Slot
      Capabilities register) but in reality they neither set the Command
      Completed bit in the Slot Status register nor signal a Command Completed
      interrupt:
      
        8086:1513  CV82524  [Light Ridge 4C  2010]
        8086:151a  DSL2310  [Eagle Ridge 2C  2011]
        8086:151b  CVL2510  [Light Peak 2C   2010]
        8086:1547  DSL3510  [Cactus Ridge 4C 2012]
        8086:1548  DSL3310  [Cactus Ridge 2C 2012]
        8086:1549  DSL2210  [Port Ridge 1C   2011]
      
      All known newer chips (Redwood Ridge and onwards) set No Command Completed
      Support, indicating that they do not support Command Completed events.
      
      The user-visible impact is that after unplugging such a device, 2 seconds
      elapse until pciehp is unbound.  That's because on ->remove,
      pcie_write_cmd() is called via pcie_disable_notification() and every call
      to pcie_write_cmd() takes 2 seconds (1 second for each invocation of
      pcie_wait_cmd()):
      
        [  337.942727] pciehp 0000:0a:00.0:pcie204: Timeout on hotplug command 0x1038 (issued 21176 msec ago)
        [  340.014735] pciehp 0000:0a:00.0:pcie204: Timeout on hotplug command 0x0000 (issued 2072 msec ago)
      
      That by itself has always been unpleasant, but the situation has become
      worse with commit cc27b735 ("PCI/portdrv: Turn off PCIe services during
      shutdown"):  Now pciehp is unbound on ->shutdown.  Because Thunderbolt
      controllers typically have 4 hotplug ports, every reboot and shutdown is
      now delayed by 8 seconds, plus another 2 seconds for every attached
      Thunderbolt 1 device.
      
      Thunderbolt hotplug slots are not physical slots that one inserts cards
      into, but rather logical hotplug slots implemented in silicon.  Devices
      appear beyond those logical slots once a PCI tunnel is established on top
      of the Thunderbolt Converged I/O switch.  One would expect commands written
      to the Slot Control register to be executed immediately by the silicon, so
      for simplicity we always assume NoCompl+ for Thunderbolt ports.
      
      Fixes: cc27b735 ("PCI/portdrv: Turn off PCIe services during shutdown")
      Tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: stable@vger.kernel.org	# v4.12+
      Cc: Sinan Kaya <okaya@codeaurora.org>
      Cc: Yehezkel Bernat <yehezkel.bernat@intel.com>
      Cc: Michael Jamet <michael.jamet@intel.com>
      Cc: Andreas Noever <andreas.noever@gmail.com>
      493fb50e
  7. 19 Jan, 2018 1 commit
    • Niklas Cassel's avatar
      PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build · 80db6f08
      Niklas Cassel authored
      Some hardware can operate in either "host" or "endpoint" mode, which means
      there can be both a host bridge driver and an endpoint driver for the same
      device.  Those drivers share a lot of code, so sometimes they live in the
      same source file.
      
      The host bridge driver requires CONFIG_PCI=y because it enumerates PCI
      devices below the bridge using the PCI core.  The endpoint driver does not
      require CONFIG_PCI=y because it runs in an embedded kernel on the other
      side of the device, e.g., on an adapter card.
      
      pci-dra7xx.c contains both host and endpoint drivers.  If we select only
      the endpoint driver (CONFIG_PCI=n and CONFIG_PCI_DRA7XX_EP=y), the unneeded
      host driver is still compiled.  It references pci_irqd_intx_xlate(), which
      is not present when CONFIG_PCI=n, which causes this error:
      
        drivers/pci/dwc/pci-dra7xx.c:229:11: error: 'pci_irqd_intx_xlate' undeclared here (not in a function)
      
      Add a dummy pci_irqd_intx_xlate() for the CONFIG_PCI=n case.
      
      [bhelgaas: changelog]
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      80db6f08
  8. 18 Jan, 2018 5 commits
  9. 17 Jan, 2018 4 commits
    • Rob Herring's avatar
      powerpc/pci: Use of_irq_parse_and_map_pci() helper · 59f47eff
      Rob Herring authored
      Instead of calling both of_irq_parse_pci() and irq_create_of_mapping(),
      call of_irq_parse_and_map_pci(), which does the same thing. This will allow
      making of_irq_parse_pci() a private, static function.
      
      This changes the logic slightly in that the fallback path will also be
      taken if irq_create_of_mapping() fails internally.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      [bhelgaas: fold in virq init from Stephen Rothwell <sfr@canb.auug.org.au>]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      59f47eff
    • Rob Herring's avatar
      PCI: Move OF-related PCI functions into PCI core · 4670d610
      Rob Herring authored
      Following what has been done for other subsystems, move the remaining PCI
      related code out of drivers/of/ and into drivers/pci/of.c
      
      With this, we can kill a few kconfig symbols.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      [bhelgaas: minor whitespace, comment cleanups]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Frank Rowand <frowand.list@gmail.com>
      4670d610
    • Markus Elfring's avatar
      PCI: Remove unnecessary messages for memory allocation failures · c7abb235
      Markus Elfring authored
      Per ebfdc409 ("checkpatch: attempt to find unnecessary 'out of memory'
      messages"), when a memory allocation fails, the memory subsystem emits
      generic "out of memory" messages (see slab_out_of_memory() for some of this
      logging).  Therefore, additional error messages in the caller don't add
      much value.
      
      Remove messages that merely report "out of memory".
      
      This preserves some messages that report additional information, e.g.,
      allocation failures that mean we drop hotplug events.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      [bhelgaas: changelog, squash patches, make similar changes to acpiphp,
      cpqphp, ibmphp, keep warning when dropping hotplug event]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      c7abb235
    • Sinan Kaya's avatar
      video: fbdev: riva: deprecate pci_get_bus_and_slot() · e2281080
      Sinan Kaya authored
      pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
      where a PCI device is present. This restricts the device drivers to be
      reused for other domain numbers.
      
      Getting ready to remove pci_get_bus_and_slot() function in favor of
      pci_get_domain_bus_and_slot().
      
      struct riva_par has a pointer to struct pci_dev. Use the pci_dev member
      to extract the domain information.
      
      Change the function signature for CalcStateExt and RivaGetConfig to pass
      in struct pci_dev in addition to RIVA_HW_INST so that code inside the
      riva_hw.c can also calculate domain number and pass it to
      pci_get_domain_bus_and_slot().
      Signed-off-by: default avatarSinan Kaya <okaya@codeaurora.org>
      Signed-off-by: default avatarBjorn Helgaas <helgaas@kernel.org>
      Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      e2281080