1. 31 Jan, 2018 14 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/virtualization' into next · a07ae842
      Bjorn Helgaas authored
      * pci/virtualization:
        PCI: Expose ari_enabled in sysfs
        PCI: Add function 1 DMA alias quirk for Marvell 9128
        PCI: Mark Ceton InfiniTV4 INTx masking as broken
        xen/pci: Use acpi_noirq_set() helper to avoid #ifdef
      a07ae842
    • Bjorn Helgaas's avatar
      Merge branch 'pci/trivial' into next · 01f095e4
      Bjorn Helgaas authored
      * pci/trivial:
        PCI: Clean up whitespace in linux/pci.h, pci/pci.h
        PCI: Tidy up pci/probe.c comments
      01f095e4
    • Bjorn Helgaas's avatar
      Merge branch 'pci/switchtec' into next · 6a436fa8
      Bjorn Helgaas authored
      * pci/switchtec:
        switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3
        switchtec: Add Global Fabric Manager Server (GFMS) event
      6a436fa8
    • Bjorn Helgaas's avatar
      Merge branch 'pci/resource' into next · 414ae760
      Bjorn Helgaas authored
      * pci/resource:
        PCI: tegra: Remove PCI_REASSIGN_ALL_BUS use on Tegra
        resource: Set type when reserving new regions
        resource: Set type of "reserve=" user-specified resources
        irqchip/i8259: Set I/O port resource types correctly
        powerpc: Set I/O port resource types correctly
        MIPS: Set I/O port resource types correctly
        vgacon: Set VGA struct resource types
        PCI: Use dev_info() rather than dev_err() for ROM validation
        PCI: Remove PCI_REASSIGN_ALL_RSRC use on arm and arm64
        PCI: Remove sysfs resource mmap warning
      
      Conflicts:
      	drivers/pci/rom.c
      414ae760
    • 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 3 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
    • Stuart Hayes's avatar
      PCI: Expose ari_enabled in sysfs · 0077a845
      Stuart Hayes authored
      Some multifunction PCI devices with more than 8 functions use "alternative
      routing-ID interpretation" (ARI), which means the 8-bit device/function
      number field will be interpreted as 8 bits specifying the function number
      (the device number is 0 implicitly), rather than the upper 5 bits
      specifying the device number and the lower 3 bits specifying the function
      number. The kernel can enable and use this.
      
      Expose in a sysfs attribute whether the kernel has enabled ARI, so that a
      program in userspace won't have to parse PCI devices and PCI configuration
      space to figure out if it is enabled. This will allow better predictable
      network naming using PCI function numbers without using PCI bus or device
      numbers, which is desirable because bus and device numbers can change with
      system configuration but function numbers will not.
      Signed-off-by: default avatarStuart Hayes <stuart.w.hayes@gmail.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      0077a845
    • 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 4 commits