1. Oct 29, 2023
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/xilinx-ecam' · fb3d102f
      Bjorn Helgaas authored
      - Drop xilinx-nwl updates of bridge bus number fields, since PCI core
        already does that (Thippeswamy Havalige)
      
      - Update xilinx-nwl driver and ECAM size in devicetree example to allow up
        to 256 buses (Thippeswamy Havalige)
      
      * pci/controller/xilinx-ecam:
        PCI: xilinx-nwl: Modify ECAM size to enable support for 256 buses
        PCI: xilinx-nwl: Rename the NWL_ECAM_VALUE_DEFAULT macro
        dt-bindings: PCI: xilinx-nwl: Modify ECAM size in the DT example
        PCI: xilinx-nwl: Remove redundant code that sets Type 1 header fields
      fb3d102f
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/vmd' · a4179c60
      Bjorn Helgaas authored
      - Fix space/tab whitespace issue (Xinghui Li)
      
      * pci/controller/vmd:
        PCI: vmd: Fix inconsistent indentation in vmd_resume()
      a4179c60
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/speed' · d97ab9e5
      Bjorn Helgaas authored
      - Use PCIE_SPEED2MBS_ENC() macro in qcom host and endpoint to encode link
        speed instead of hard-coding the link speed in MBps (Manivannan
        Sadhasivam)
      
      - Use Mbps_to_icc() (not MBps_to_icc()) in tegra194 instead of explicitly
        doing the bytes-to-bits conversion (Manivannan Sadhasivam)
      
      * pci/controller/speed:
        PCI: tegra194: Use Mbps_to_icc() macro for setting icc speed
        PCI: qcom-ep: Use PCIE_SPEED2MBS_ENC() macro for encoding link speed
        PCI: qcom: Use PCIE_SPEED2MBS_ENC() macro for encoding link speed
      d97ab9e5
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/rcar' · db20113d
      Bjorn Helgaas authored
      - Add generic T_PVPERL macro for the required interval between power being
        stable and PERST# being inactive (Yoshihiro Shimoda)
      
      - Factor out dw_pcie_link_set_max_link_width() (Yoshihiro Shimoda)
      
      - Update PCI_EXP_LNKCAP_MLW so Link Capabilities shows the correct max link
        width (Yoshihiro Shimoda)
      
      - Drop tegra194 PCI_EXP_LNKCAP_MLW setting since dw_pcie_setup() already
        does it (Yoshihiro Shimoda)
      
      - Add dwc support for different dbi and dbi2 register offsets, to be used
        for R-Car Gen4 controllers (Yoshihiro Shimoda)
      
      - Add EDMA_UNROLL capability flag for R-Car Gen4 controllers that don't
        correctly advertise unrolled mapping via their eDMA CTRL register
        (Yoshihiro Shimoda)
      
      - Export dw_pcie_ep_exit() for use by the modular R-Car Gen4 driver
        (Yoshihiro Shimoda)
      
      - Add .pre_init() and .deinit() hooks for use by R-Car Gen4 controllers
        (Yoshihiro Shimoda)
      
      - Increase snps,dw-pcie DT reg and reg-names maxItems for R-Car Gen4
        controllers (Yoshihiro Shimoda)
      
      - Add rcar-gen4-pci host and endpoint DT bindings and drivers (Yoshihiro
        Shimoda)
      
      - Add Renesas R8A779F0 Device ID to pci_endpoint_test to allow testing on
        R-Car S4-8 (Yoshihiro Shimoda)
      
      * pci/controller/rcar:
        misc: pci_endpoint_test: Add Device ID for R-Car S4-8 PCIe controller
        MAINTAINERS: Update PCI DRIVER FOR RENESAS R-CAR for R-Car Gen4
        PCI: rcar-gen4: Add endpoint mode support
        PCI: rcar-gen4: Add R-Car Gen4 PCIe controller support for host mode
        dt-bindings: PCI: renesas: Add R-Car Gen4 PCIe Endpoint
        dt-bindings: PCI: renesas: Add R-Car Gen4 PCIe Host
        dt-bindings: PCI: dwc: Update maxItems of reg and reg-names
        PCI: dwc: endpoint: Introduce .pre_init() and .deinit()
        PCI: dwc: Expose dw_pcie_write_dbi2() to module
        PCI: dwc: Expose dw_pcie_ep_exit() to module
        PCI: dwc: Add EDMA_UNROLL capability flag
        PCI: dwc: endpoint: Add multiple PFs support for dbi2
        PCI: tegra194: Drop PCI_EXP_LNKSTA_NLW setting
        PCI: dwc: Add missing PCI_EXP_LNKCAP_MLW handling
        PCI: dwc: Add dw_pcie_link_set_max_link_width()
        PCI: Add T_PVPERL macro
      db20113d
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/qcom-ep' · eecffeb0
      Bjorn Helgaas authored
      - Add qcom-ep callback to write DBI2 registers (Manivannan Sadhasivam)
      
      * pci/controller/qcom-ep:
        PCI: qcom-ep: Add dedicated callback for writing to DBI2 registers
      eecffeb0
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/layerscape' · e365a36e
      Bjorn Helgaas authored
      - Set 64-bit DMA mask for layerscape-ep (Guanhua Gao)
      
      * pci/controller/layerscape:
        PCI: layerscape-ep: Set 64-bit DMA mask
      e365a36e
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/hyperv' · 7fa8fe0b
      Bjorn Helgaas authored
      - Annotate struct hv_dr_state with __counted_by to prepare for array access
        bounds checking (Kees Cook)
      
      * pci/controller/hyperv:
        PCI: hv: Annotate struct hv_dr_state with __counted_by
      7fa8fe0b
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/cadence' · c97e5905
      Bjorn Helgaas authored
      - Drop unused struct cdns_plat_pcie.is_rc member (Li Chen)
      
      * pci/controller/cadence:
        PCI: cadence: Drop unused member from struct cdns_plat_pcie
      c97e5905
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/aspm' · 86b812dc
      Bjorn Helgaas authored
      - Add a dwc .host_post_init() callback for configuration after downstream
        devices are scanned (Manivannan Sadhasivam)
      
      - Enable ASPM for devices below qcom 1.9.0 host controllers (Manivannan
        Sadhasivam)
      
      * pci/controller/aspm:
        PCI: qcom: Enable ASPM for platforms supporting 1.9.0 ops
        PCI: dwc: Add host_post_init() callback
      86b812dc
    • Bjorn Helgaas's avatar
      Merge branch 'pci/vga' · dbf9527c
      Bjorn Helgaas authored
      - Add pci_is_vga() helper, which checks for both PCI_CLASS_DISPLAY_VGA and
        PCI_CLASS_NOT_DEFINED_VGA (which catches ancient devices built before
        Class Codes were defined) (Sui Jingfeng)
      
      - Use the new pci_is_vga() to identify devices for the VGA arbiter, the
        sysfs "boot_vga" attribute, and the virtio and qxl drivers (SUi Jingfeng)
      
      * pci/vga:
        drm/qxl: Use pci_is_vga() to identify VGA devices
        drm/virtio: Use pci_is_vga() to identify VGA devices
        PCI/sysfs: Enable 'boot_vga' attribute via pci_is_vga()
        PCI/VGA: Select VGA devices earlier
        PCI/VGA: Use pci_is_vga() to identify VGA devices
        PCI: Add pci_is_vga() helper
      dbf9527c
    • Bjorn Helgaas's avatar
      Merge branch 'pci/reset' · 79a8394a
      Bjorn Helgaas authored
      - Lengthen reset delay for VideoPropulsion Torrent QN16e card, which seems
        to require longer delay than spec requires (Lukas Wunner)
      
      * pci/reset:
        PCI: Lengthen reset delay for VideoPropulsion Torrent QN16e card
      79a8394a
    • Bjorn Helgaas's avatar
      Merge branch 'pci/pm' · 2afbbc65
      Bjorn Helgaas authored
      - Protect driver's D3cold preference from being overwritten by user space
        via sysfs (Lukas Wunner)
      
      - Avoid PME from D3hot/D3cold for AMD Rembrandt and Phoenix USB4 to fix
        wakeup by USB4-attached devices (Mario Limonciello)
      
      * pci/pm:
        x86/PCI: Avoid PME from D3hot/D3cold for AMD Rembrandt and Phoenix USB4
        PCI/sysfs: Protect driver's D3cold preference from user space
      2afbbc65
    • Bjorn Helgaas's avatar
      Merge branch 'pci/p2pdma' · 20949188
      Bjorn Helgaas authored
      - Move struct dev_pagemap (a flexible structure) to end of struct
        pci_p2pdma_pagemap to avoid overwriting things after dev_pagemap
        (Gustavo A. R.  Silva)
      
      * pci/p2pdma:
        PCI/P2PDMA: Remove redundant goto
        PCI/P2PDMA: Fix undefined behavior bug in struct pci_p2pdma_pagemap
      20949188
    • Bjorn Helgaas's avatar
      Merge branch 'pci/hotplug' · adfe8d72
      Bjorn Helgaas authored
      - Add driver for Ampere Altra Attention Indicators (D Scott Phillips)
      
      * pci/hotplug:
        PCI: hotplug: Add Ampere Altra Attention Indicator extension driver
        PCI: acpiphp: Allow built-in drivers for Attention Indicators
      adfe8d72
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' · 553b84bf
      Bjorn Helgaas authored
      - Add and use pci_get_base_class() to search for all PCI_BASE_CLASS_DISPLAY
        devices (Sui Jingfeng)
      
      - Fix a vmd check for multi-function devices (Ilpo Järvinen)
      
      - Add PCI_HEADER_TYPE_MFD and use it to replace literals (Ilpo Järvinen)
      
      - Use acpi_evaluate_dsm_typed() instead of open-coding it (Andy Shevchenko)
      
      - Keep .remove() and .probe() callbacks (previously marked __init) in case
        they're used via sysfs (Uwe Kleine-König)
      
      * pci/enumeration:
        PCI: keystone: Don't discard .probe() callback
        PCI: keystone: Don't discard .remove() callback
        PCI: kirin: Don't discard .remove() callback
        PCI: exynos: Don't discard .remove() callback
        PCI/ACPI: Use acpi_evaluate_dsm_typed()
        PCI: Use PCI_HEADER_TYPE_* instead of literals
        PCI: Add PCI_HEADER_TYPE_MFD definition
        PCI: vmd: Correct PCI Header Type Register's multi-function check
        drm/radeon: Use pci_get_base_class() to reduce duplicated code
        drm/amdgpu: Use pci_get_base_class() to reduce duplicated code
        drm/nouveau: Use pci_get_base_class() to reduce duplicated code
        ALSA: hda: Use pci_get_base_class() to reduce duplicated code
        PCI: Add pci_get_base_class() helper
      553b84bf
    • Bjorn Helgaas's avatar
      Merge branch 'pci/endpoint' · 4eccbed8
      Bjorn Helgaas authored
      - Use IS_ERR_OR_NULL() helper function instead of open-coding it (Ruan
        Jinjie)
      
      * pci/endpoint:
        PCI: endpoint: Use IS_ERR_OR_NULL() helper function
      4eccbed8
    • Bjorn Helgaas's avatar
      Merge branch 'pci/ats' · 3c14a050
      Bjorn Helgaas authored
      - Disable ATS for Intel IPU E2000 A- and B-stepping devices to avoid
        invalidation message endianness erratum (Bartosz Pawlowski)
      
      * pci/ats:
        PCI: Disable ATS for specific Intel IPU E2000 devices
        PCI: Extract ATS disabling to a helper function
      3c14a050
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aspm' · b63c6dfe
      Bjorn Helgaas authored
      * pci/aspm:
        PCI/ASPM: Fix L1 substate handling in aspm_attr_store_common()
        Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1"
        PCI/ASPM: Convert printk() to pr_*() and add include
        PCI/ASPM: Remove unnecessary includes
        PCI/ASPM: Use FIELD_MAX() instead of literals
        PCI/ASPM: Use time constants
        PCI/ASPM: Return U32_MAX instead of bit magic construct
        PCI/ASPM: Use FIELD_GET/PREP() to access PCIe capability fields
        PCI: Add PCI_L1SS_CTL2 fields
      b63c6dfe
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aer' · b3fabba9
      Bjorn Helgaas authored
      - Factor out AER interrupt enable/disable (Kai-Heng Feng)
      
      * pci/aer:
        PCI/AER: Factor out interrupt toggling into helpers
      b3fabba9
  2. Oct 27, 2023
  3. Oct 26, 2023
  4. Oct 25, 2023
    • Heiner Kallweit's avatar
      PCI/ASPM: Fix L1 substate handling in aspm_attr_store_common() · 8e37372a
      Heiner Kallweit authored
      aspm_attr_store_common(), which handles sysfs control of ASPM, has the same
      problem as fb097dcd ("PCI/ASPM: Disable only ASPM_STATE_L1 when driver
      disables L1"): disabling L1 adds only ASPM_L1 (but not any of the L1.x
      substates) to the "aspm_disable" mask.
      
      Enabling one substate, e.g., L1.1, via sysfs removes ASPM_L1 from the
      disable mask.  Since disabling L1 via sysfs doesn't add any of the
      substates to the disable mask, enabling L1.1 actually enables *all* the
      substates.
      
      In this scenario:
      
        - Write 0 to "l1_aspm" to disable L1
        - Write 1 to "l1_1_aspm" to enable L1.1
      
      the intention is to disable L1 and all L1.x substates, then enable just
      L1.1, but in fact, *all* L1.x substates are enabled.
      
      Fix this by explicitly disabling all the L1.x substates when disabling L1.
      
      Fixes: 72ea91af ("PCI/ASPM: Add sysfs attributes for controlling ASPM link states")
      Link: https://lore.kernel.org/r/6ba7dd79-9cfe-4ed0-a002-d99cb842f361@gmail.com
      
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      [bhelgaas: commit log]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org
      8e37372a
    • Heiner Kallweit's avatar
      Revert "PCI/ASPM: Disable only ASPM_STATE_L1 when driver, disables L1" · 3cb4f534
      Heiner Kallweit authored
      This reverts commit fb097dcd.
      
      After fb097dcd ("PCI/ASPM: Disable only ASPM_STATE_L1 when driver
      disables L1"), disabling L1 via pci_disable_link_state(PCIE_LINK_STATE_L1),
      then enabling one substate, e.g., L1.1, via sysfs actually enables *all*
      the substates.
      
      For example, r8169 disables L1 because of hardware issues on a number of
      systems, which implicitly disables the L1.1 and L1.2 substates.
      
      On some systems, L1 and L1.1 work fine, but L1.2 causes missed rx packets.
      Enabling L1.1 via the sysfs "aspm_l1_1" attribute unexpectedly enables L1.2
      as well as L1.1.
      
      After fb097dcd, pci_disable_link_state(PCIE_LINK_STATE_L1) adds only
      ASPM_L1 (but not any of the L1.x substates) to the "aspm_disable" mask:
      
        --- Before fb097dcd
        +++ After fb097dcd
      
        # r8169 disables L1:
          pci_disable_link_state(PCIE_LINK_STATE_L1)
        -   disable |= ASPM_L1 | ASPM_L1_1 | ASPM_L1_2 | ...  # disable L1, L1.x
        +   disable |= ASPM_L1                                # disable L1 only
      
        # write "1" to sysfs "aspm_l1_1" attribute:
          l1_1_aspm
            aspm_attr_store_common(state = ASPM_L1_1)
              disable &= ~ASPM_L1_1              # enable L1.1
              if (state & (ASPM_L1_1 | ...))     # if enabling any substate
                disable &= ~ASPM_L1              # enable L1
      
        # final state:
        - disable = ASPM_L1_2 | ...              # L1, L1.1 enabled; L1.2 disabled
        + disable = 0                            # L1, L1.1, L1.2 all enabled
      
      Enabling an L1.x substate removes the substate and L1 from the
      "aspm_disable" mask.  After fb097dcd, the substates were not added to
      the mask when disabling L1, so enabling one substate implicitly enables all
      of them.
      
      Revert fb097dcd so enabling one substate doesn't enable the others.
      
      Link: https://lore.kernel.org/r/c75931ac-7208-4200-9ca1-821629cf5e28@gmail.com
      
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      [bhelgaas: work through example in commit log]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org
      3cb4f534
  5. Oct 24, 2023
  6. Oct 23, 2023
  7. Oct 20, 2023