1. Oct 29, 2023
    • 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 26, 2023
  3. 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
  4. Oct 24, 2023
  5. Oct 19, 2023
  6. Oct 11, 2023
  7. Oct 07, 2023
  8. Oct 06, 2023
  9. Oct 04, 2023