1. 06 Jun, 2018 6 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/misc' · aee9684a
      Bjorn Helgaas authored
        - add macros for PCIe Link Control 2 register (Frederick Lawler)
      
        - replace IB/hfi1 custom macros with PCI core versions (Frederick Lawler)
      
        - remove dead microblaze and xtensa code (Bjorn Helgaas)
      
        - use dev_printk() when possible in xtensa and mips (Bjorn Helgaas)
      
      * pci/misc:
        MIPS: PCI: Use dev_printk() when possible
        xtensa/PCI: Use dev_printk() when possible
        xtensa/PCI: Make variables static
        xtensa/PCI: Remove dead code
        microblaze/PCI: Remove pcibios_claim_one_bus() dead code
        microblaze/PCI: Remove pcibios_finish_adding_to_bus() dead code
        IB/hfi1: Replace custom hfi1 macros with PCIe macros
        PCI: Add PCI_EXP_LNKCTL2_TLS* macros
      aee9684a
    • Bjorn Helgaas's avatar
      Merge branch 'pci/hotplug' · f64c1464
      Bjorn Helgaas authored
        - fix use-before-set error in ibmphp (Dan Carpenter)
      
        - fix pciehp timeouts caused by Command Completed errata (Bjorn Helgaas)
      
        - fix refcounting in pnv_php hotplug (Julia Lawall)
      
        - clear pciehp Presence Detect and Data Link Layer Status Changed on
          resume so we don't miss hotplug events (Mika Westerberg)
      
        - only request pciehp control if we support it, so platform can use ACPI
          hotplug otherwise (Mika Westerberg)
      
        - convert SHPC to be builtin only (Mika Westerberg)
      
        - request SHPC control via _OSC if we support it (Mika Westerberg)
      
        - simplify SHPC handoff from firmware (Mika Westerberg)
      
      * pci/hotplug:
        PCI: Improve "partially hidden behind bridge" log message
        PCI: Improve pci_scan_bridge() and pci_scan_bridge_extend() doc
        PCI: Move resource distribution for single bridge outside loop
        PCI: Account for all bridges on bus when distributing bus numbers
        ACPI / hotplug / PCI: Drop unnecessary parentheses
        ACPI / hotplug / PCI: Mark stale PCI devices disconnected
        ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug
        PCI: hotplug: Add hotplug_is_native()
        PCI: shpchp: Add shpchp_is_native()
        PCI: shpchp: Fix AMD POGO identification
        PCI: shpchp: Use dev_printk() for OSHP-related messages
        PCI: shpchp: Remove get_hp_hw_control_from_firmware() wrapper
        PCI: shpchp: Remove acpi_get_hp_hw_control_from_firmware() flags
        PCI: shpchp: Rely on previous _OSC results
        PCI: shpchp: Request SHPC control via _OSC when adding host bridge
        PCI: shpchp: Convert SHPC to be builtin only
        PCI: pciehp: Make pciehp_is_native() stricter
        PCI: pciehp: Rename host->native_hotplug to host->native_pcie_hotplug
        PCI: pciehp: Request control of native hotplug only if supported
        PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume
        PCI: pnv_php: Add missing of_node_put()
        PCI: pciehp: Add quirk for Command Completed errata
        PCI: Add Qualcomm vendor ID
        PCI: ibmphp: Fix use-before-set in get_max_bus_speed()
      
      # Conflicts:
      #	drivers/acpi/pci_root.c
      f64c1464
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' · 5e3165d1
      Bjorn Helgaas authored
        - neaten pci=earlydump output (Andy Shevchenko)
      
        - avoid errors when extended config space inaccessible (Gilles Buloz)
      
        - prevent sysfs disable of device while driver attached (Christoph
          Hellwig)
      
        - use core interface to report PCIe link properties in bnx2x, bnxt_en,
          cxgb4, ixgbe (Bjorn Helgaas)
      
        - remove unused pcie_get_minimum_link() (Bjorn Helgaas)
      
      * pci/enumeration:
        PCI: Remove unused pcie_get_minimum_link()
        ixgbe: Report PCIe link properties with pcie_print_link_status()
        cxgb4: Report PCIe link properties with pcie_print_link_status()
        bnxt_en: Report PCIe link properties with pcie_print_link_status()
        bnx2x: Report PCIe link properties with pcie_print_link_status()
        PCI: Prevent sysfs disable of device while driver is attached
        PCI: Check whether bridges allow access to extended config space
        x86/PCI: Make pci=earlydump output neat
      5e3165d1
    • Bjorn Helgaas's avatar
      Merge branch 'pci/dpc' · 8e069da2
      Bjorn Helgaas authored
        - clear interrupt status in top half to avoid interrupt storm (Oza
          Pawandeep)
      
      * pci/dpc:
        PCI/DPC: Clear interrupt status in interrupt handler top half
      8e069da2
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aspm' · 08b5b2f7
      Bjorn Helgaas authored
        - disable ASPM L1.2 substate if we don't have LTR (Bjorn Helgaas)
      
        - respect platform ownership of LTR (Bjorn Helgaas)
      
      * pci/aspm:
        PCI/ACPI: Request LTR control from platform before using it
        PCI/ASPM: Disable ASPM L1.2 Substate if we don't have LTR
      08b5b2f7
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aer' · d7e02c08
      Bjorn Helgaas authored
        - unify AER decoding for native and ACPI CPER sources (Alexandru Gagniuc)
      
        - add TLP header info to AER tracepoint (Thomas Tai)
      
        - add generic pcie_wait_for_link() interface (Oza Pawandeep)
      
        - handle AER ERR_FATAL by removing and re-enumerating devices, as
          Downstream Port Containment does (Oza Pawandeep)
      
        - factor out common code between AER and DPC recovery (Oza Pawandeep)
      
        - stop triggering DPC for ERR_NONFATAL errors (Oza Pawandeep)
      
        - share ERR_FATAL recovery path between AER and DPC (Oza Pawandeep)
      
      * pci/aer:
        PCI/AER: Replace struct pcie_device with pci_dev
        PCI/AER: Remove unused parameters
        PCI/AER: Decode Error Source Requester ID
        PCI/AER: Remove aer_recover_work_func() forward declaration
        PCI/DPC: Use the generic pcie_do_fatal_recovery() path
        PCI/AER: Pass service type to pcie_do_fatal_recovery()
        PCI/DPC: Disable ERR_NONFATAL handling by DPC
        PCI/portdrv: Add generic pcie_port_find_device()
        PCI/portdrv: Add generic pcie_port_find_service()
        PCI/AER: Factor out error reporting to drivers/pci/pcie/err.c
        PCI/AER: Rename error recovery interfaces to generic PCI naming
        PCI/AER: Handle ERR_FATAL with removal and re-enumeration of devices
        PCI: Add generic pcie_wait_for_link() interface
        PCI/AER: Add TLP header information to tracepoint
        PCI/AER: Unify error bit printing for native and CPER reporting
      d7e02c08
  2. 05 Jun, 2018 2 commits
  3. 04 Jun, 2018 10 commits
  4. 03 Jun, 2018 6 commits
  5. 02 Jun, 2018 8 commits
  6. 25 May, 2018 6 commits
    • Bjorn Helgaas's avatar
      PCI: Remove unused pcie_get_minimum_link() · e5b1db01
      Bjorn Helgaas authored
      In some cases pcie_get_minimum_link() returned misleading information
      because it found the slowest link and the narrowest link without
      considering the total bandwidth of the link.
      
      For example, consider a path with these two links:
      
        - 16.0 GT/s  x1 link  (16.0 * 10^9 * 128 / 130) *  1 / 8 = 1969 MB/s
        -  2.5 GT/s x16 link  ( 2.5 * 10^9 *   8 /  10) * 16 / 8 = 4000 MB/s
      
      The available bandwidth of the path is limited by the 16 GT/s link to about
      1969 MB/s, but pcie_get_minimum_link() returned 2.5 GT/s x1, which
      corresponds to only 250 MB/s.
      
      Callers should use pcie_print_link_status() instead, or
      pcie_bandwidth_available() if they need more detailed information.
      
      Remove pcie_get_minimum_link() since there are no callers left.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      e5b1db01
    • Bjorn Helgaas's avatar
      ixgbe: Report PCIe link properties with pcie_print_link_status() · 4695ca9d
      Bjorn Helgaas authored
      Previously the driver used pcie_get_minimum_link() to warn when the NIC
      is in a slot that can't supply as much bandwidth as the NIC could use.
      
      pcie_get_minimum_link() can be misleading because it finds the slowest link
      and the narrowest link (which may be different links) without considering
      the total bandwidth of each link.  For a path with a 16 GT/s x1 link and a
      2.5 GT/s x16 link, it returns 2.5 GT/s x1, which corresponds to 250 MB/s of
      bandwidth, not the true available bandwidth of about 1969 MB/s for a
      16 GT/s x1 link.
      
      Use pcie_print_link_status() to report PCIe link speed and possible
      limitations instead of implementing this in the driver itself.  This finds
      the slowest link in the path to the device by computing the total bandwidth
      of each link and compares that with the capabilities of the device.
      
      The dmesg change is:
      
        - PCI Express bandwidth of %dGT/s available
        - (Speed:%s, Width: x%d, Encoding Loss:%s)
        + %u.%03u Gb/s available PCIe bandwidth (%s x%d link)
      
      or, if the device is capable of better performance than is available in the
      current slot:
      
        - This is not sufficient for optimal performance of this card.
        - For optimal performance, at least %dGT/s of bandwidth is required.
        - A slot with more lanes and/or higher speed is suggested.
        + %u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)
      
      Note that the driver previously used dev_warn() to suggest using a
      different slot, but pcie_print_link_status() uses dev_info() because if the
      platform has no faster slot available, the user can't do anything about the
      warning and may not want to be bothered with it.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4695ca9d
    • Bjorn Helgaas's avatar
      cxgb4: Report PCIe link properties with pcie_print_link_status() · 57d12fc6
      Bjorn Helgaas authored
      Previously the driver used pcie_get_minimum_link() to warn when the NIC
      is in a slot that can't supply as much bandwidth as the NIC could use.
      
      pcie_get_minimum_link() can be misleading because it finds the slowest link
      and the narrowest link (which may be different links) without considering
      the total bandwidth of each link.  For a path with a 16 GT/s x1 link and a
      2.5 GT/s x16 link, it returns 2.5 GT/s x1, which corresponds to 250 MB/s of
      bandwidth, not the true available bandwidth of about 1969 MB/s for a
      16 GT/s x1 link.
      
      Use pcie_print_link_status() to report PCIe link speed and possible
      limitations instead of implementing this in the driver itself.  This finds
      the slowest link in the path to the device by computing the total bandwidth
      of each link and compares that with the capabilities of the device.
      
      The dmesg change is:
      
        - PCIe link speed is %s, device supports %s
        - PCIe link width is x%d, device supports x%d
        + %u.%03u Gb/s available PCIe bandwidth (%s x%d link)
      
      or, if the device is capable of better performance than is available in the
      current slot:
      
        - A slot with more lanes and/or higher speed is suggested for optimal performance.
        + %u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      57d12fc6
    • Bjorn Helgaas's avatar
      bnxt_en: Report PCIe link properties with pcie_print_link_status() · af125b75
      Bjorn Helgaas authored
      Previously the driver used pcie_get_minimum_link() to warn when the NIC
      is in a slot that can't supply as much bandwidth as the NIC could use.
      
      pcie_get_minimum_link() can be misleading because it finds the slowest link
      and the narrowest link (which may be different links) without considering
      the total bandwidth of each link.  For a path with a 16 GT/s x1 link and a
      2.5 GT/s x16 link, it returns 2.5 GT/s x1, which corresponds to 250 MB/s of
      bandwidth, not the true available bandwidth of about 1969 MB/s for a
      16 GT/s x1 link.
      
      Use pcie_print_link_status() to report PCIe link speed and possible
      limitations instead of implementing this in the driver itself.  This finds
      the slowest link in the path to the device by computing the total bandwidth
      of each link and compares that with the capabilities of the device.
      
      The dmesg change is:
      
        - PCIe: Speed %s Width x%d
        + %u.%03u Gb/s available PCIe bandwidth (%s x%d link)
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      af125b75
    • Bjorn Helgaas's avatar
      bnx2x: Report PCIe link properties with pcie_print_link_status() · cc04a1dd
      Bjorn Helgaas authored
      Previously the driver used pcie_get_minimum_link() to warn when the NIC
      is in a slot that can't supply as much bandwidth as the NIC could use.
      
      pcie_get_minimum_link() can be misleading because it finds the slowest link
      and the narrowest link (which may be different links) without considering
      the total bandwidth of each link.  For a path with a 16 GT/s x1 link and a
      2.5 GT/s x16 link, it returns 2.5 GT/s x1, which corresponds to 250 MB/s of
      bandwidth, not the true available bandwidth of about 1969 MB/s for a
      16 GT/s x1 link.
      
      Use pcie_print_link_status() to report PCIe link speed and possible
      limitations instead of implementing this in the driver itself.  This finds
      the slowest link in the path to the device by computing the total bandwidth
      of each link and compares that with the capabilities of the device.
      
      The dmesg change is:
      
        - %s (%c%d) PCI-E x%d %s found at mem %lx, IRQ %d, node addr %pM
        + %s (%c%d) PCI-E found at mem %lx, IRQ %d, node addr %pM
        + %u.%03u Gb/s available PCIe bandwidth (%s x%d link)
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      cc04a1dd
    • Christoph Hellwig's avatar
      PCI: Prevent sysfs disable of device while driver is attached · 6f5cdfa8
      Christoph Hellwig authored
      Manipulating the enable_cnt behind the back of the driver will wreak
      complete havoc with the kernel state, so disallow it.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Acked-by: default avatarKeith Busch <keith.busch@intel.com>
      6f5cdfa8
  7. 23 May, 2018 2 commits