1. 11 12月, 2022 21 次提交
    • B
      Merge branch 'remotes/lorenzo/pci/qcom' · 008ee711
      Bjorn Helgaas 提交于
      - Add DT and driver support for SC8280XP/SA8540P basic interconnects where
        interconnect bandwidth must be requested before enabling interconnect
        clocks (Johan Hovold)
      
      - Add 'dma-coherent' property (Johan Hovold)
      
      * remotes/lorenzo/pci/qcom:
        dt-bindings: PCI: qcom: Allow 'dma-coherent' property
        PCI: qcom: Add basic interconnect support
        dt-bindings: PCI: qcom: Add SC8280XP/SA8540P interconnects
      008ee711
    • B
      Merge branch 'remotes/lorenzo/pci/mt7621' · 8ecdba32
      Bjorn Helgaas 提交于
      - Add sentinel to mt7621_pcie_quirks_match[] to prevent oops when parsing
        the table (John Thomson)
      
      * remotes/lorenzo/pci/mt7621:
        PCI: mt7621: Add sentinel to quirks table
      8ecdba32
    • B
      Merge branch 'remotes/lorenzo/pci/endpoint' · c00a1090
      Bjorn Helgaas 提交于
      - Add a .release() callback for the Endpoint Controller library so an
        Endpoint driver is removable (Yoshihiro Shimoda)
      
      - Fix pci-epf-vntb kernel-doc and whitespace (Frank Li)
      
      - Fix pci-epf-vntb error path usage of pci_epc_mem_free_addr() (Frank Li)
      
      - Remove pci-epf-vntb unused epf_db_phy (Frank Li)
      
      - Fix pci-epf-vntb sparse warnings (Frank Li)
      
      * remotes/lorenzo/pci/endpoint:
        PCI: endpoint: pci-epf-vntb: Fix sparse ntb->reg build warning
        PCI: endpoint: pci-epf-vntb: Fix sparse build warning for epf_db
        PCI: endpoint: pci-epf-vntb: Replace hardcoded 4 with sizeof(u32)
        PCI: endpoint: pci-epf-vntb: Remove unused epf_db_phy struct member
        PCI: endpoint: pci-epf-vntb: Fix call pci_epc_mem_free_addr() in error path
        PCI: endpoint: pci-epf-vntb: Fix struct epf_ntb_ctrl indentation
        PCI: endpoint: pci-epf-vntb: Clean up kernel_doc warning
        PCI: endpoint: Fix WARN() when an endpoint driver is removed
      c00a1090
    • B
      Merge branch 'remotes/lorenzo/pci/dwc' · 29a3e5ae
      Bjorn Helgaas 提交于
      - Fix n_fts[] array overrun (Vidya Sagar)
      
      - Don't advertise PTM Responder role for Endpoints (Vidya Sagar)
      
      - Fix qcom "reset assert" error message (Manivannan Sadhasivam)
      
      - Downgrade "link didn't come up" message to dev_info (Vidya Sagar)
      
      - Initialize PHY before deasserting core reset so the link comes up on
        boards where the PHY provides the reference clock (this was a regression
        in v6.0) (Sascha Hauer)
      
      - Switch histb to the gpiod API (Dmitry Torokhov)
      
      - Fix imx6sx and imx8mq clock names in DT binding (Serge Semin)
      
      - Fix visconti MSI interrupt in DT binding (Serge Semin)
      
      - Consolidate reset-gpio, cdm, windows info in common DT shared by both
        Root Port and Endpoint bindings (Serge Semin)
      
      - Remove bus node from DT examples (Serge Semin)
      
      - Add common phys, phy-names to DT (Serge Semin)
      
      - Add default max-link-speed of Gen5 to DT (Serge Semin)
      
      - Apply generic schema for generic device  (Serge Semin)
      
      - Add default max-functions of 32 to DT (Serge Semin)
      
      - Add common interrupts, interrupt-names to DT (Serge Semin)
      
      - Add common regs, reg-names to DT (Serge Semin)
      
      - Add common clocks, resets to DT (Serge Semin)
      
      - Add dma-coherent to DT (Serge Semin)
      
      - Apply common schema to Rockchip DT (Serge Semin)
      
      - Add Baikal-T1 DT bindings (Serge Semin)
      
      - Add dma-ranges support in DesignWare core (Serge Semin)
      
      - Add dw_pcie_cap_is() for testing controller capabilities (Serge Semin)
      
      - Add generic resources getter to DesignWare core (Serge Semin)
      
      - Combine iATU detection procedures (Serge Semin)
      
      - Add generic clock and reset names to DesignWare core (Serge Semin)
      
      - Add Baikal-T1 PCIe controller driver (Serge Semin)
      
      * remotes/lorenzo/pci/dwc:
        PCI: dwc: Add Baikal-T1 PCIe controller support
        PCI: dwc: Introduce generic platform clocks and resets
        PCI: dwc: Combine iATU detection procedures
        PCI: dwc: Introduce generic resources getter
        PCI: dwc: Introduce generic controller capabilities interface
        PCI: dwc: Introduce dma-ranges property support for RC-host
        dt-bindings: PCI: dwc: Add Baikal-T1 PCIe Root Port bindings
        dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes
        dt-bindings: PCI: dwc: Add dma-coherent property
        dt-bindings: PCI: dwc: Add clocks/resets common properties
        dt-bindings: PCI: dwc: Add reg/reg-names common properties
        dt-bindings: PCI: dwc: Add interrupts/interrupt-names common properties
        dt-bindings: PCI: dwc: Add max-functions EP property
        dt-bindings: PCI: dwc: Apply generic schema for generic device only
        dt-bindings: PCI: dwc: Add max-link-speed common property
        dt-bindings: PCI: dwc: Add phys/phy-names common properties
        dt-bindings: PCI: dwc: Remove bus node from the examples
        dt-bindings: PCI: dwc: Detach common RP/EP DT bindings
        dt-bindings: visconti-pcie: Fix interrupts array max constraints
        dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq
        PCI: histb: Switch to using gpiod API
        PCI: imx6: Initialize PHY before deasserting core reset
        PCI: dwc: Use dev_info for PCIe link down event logging
        PCI: qcom: Fix error message for reset_control_assert()
        PCI: designware-ep: Disable PTM capabilities for EP mode
        PCI: Add PCI_PTM_CAP_RES macro
        PCI: dwc: Fix n_fts[] array overrun
      29a3e5ae
    • B
      Merge branch 'remotes/lorenzo/pci/brcmstb' · 0ef28308
      Bjorn Helgaas 提交于
      - Enable Multi-MSI (Jim Quinlan)
      
      - Wait for 100ms after PERST# deassert for power and clocks to stabilize
        (Jim Quinlan)
      
      - Use readl_poll_timeout_atomic() instead of hand-rolled timeout loop (Jim
        Quinlan)
      
      - Drop needless "inline" annotations (Jim Quinlan)
      
      - Set RCB_MPS mode bit so data for reads up to MPS are returned in a single
        completion (Jim Quinlan)
      
      * remotes/lorenzo/pci/brcmstb:
        PCI: brcmstb: Set RCB_{MPS,64B}_MODE bits
        PCI: brcmstb: Drop needless 'inline' annotations
        PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()
        PCI: brcmstb: Wait for 100ms following PERST# deassert
        PCI: brcmstb: Enable Multi-MSI
      0ef28308
    • B
      Merge branch 'remotes/lorenzo/pci/dt' · e6936c8d
      Bjorn Helgaas 提交于
      - Add ti,j721e-pci-host interrupt controller definition (Matt Ranostay)
      
      - Add ti,j721e-pci-host interrupt properties (Matt Ranostay)
      
      - Add ti,j721s2 host mode device-id (Matt Ranostay)
      
      - Add mediatek-gen3 iommu, power properties (Jianjun Wang)
      
      - Add mediatek-gen3 SoC-based clock names (Frank Wunderlich)
      
      - Add mediatek-gen3 mt7986 support (Frank Wunderlich)
      
      * remotes/lorenzo/pci/dt:
        dt-bindings: PCI: mediatek-gen3: add support for mt7986
        dt-bindings: PCI: mediatek-gen3: add SoC based clock config
        dt-bindings: PCI: Add host mode device-id for j721s2 platform
        dt-bindings: PCI: mediatek-gen3: Support mt8195
        dt-bindings: PCI: ti,j721e-pci-*: Add missing interrupt properties
        dt-bindings: PCI: ti,j721e-pci-host: add interrupt controller definition
      e6936c8d
    • B
      Merge branch 'pci/sysfs' · 0084cd60
      Bjorn Helgaas 提交于
      - Fix a double free in the error path of creating sysfs "resource%d"
        attributes (Sascha Hauer)
      
      * pci/sysfs:
        PCI/sysfs: Fix double free in error path
      0084cd60
    • B
      Merge branch 'pci/resource' · 8961fc4f
      Bjorn Helgaas 提交于
      - Remove EfiMemoryMappedIO regions from the E820 map to allow PCI core to
        allocate BARs from them.  The only purpose of EfiMemoryMappedIO is to
        tell the OS to map things needed by EFI runtime services, so it's often
        used for PCI host bridge apertures.  If we can't allocate from those
        apertures, we can't hot-add devices (Bjorn Helgaas)
      
      * pci/resource:
        x86/PCI: Use pr_info() when possible
        x86/PCI: Fix log message typo
        x86/PCI: Tidy E820 removal messages
        PCI: Skip allocate_resource() if too little space available
        efi/x86: Remove EfiMemoryMappedIO from E820 map
      8961fc4f
    • B
      Merge branch 'pci/portdrv' · 93030501
      Bjorn Helgaas 提交于
      - Squash portdrv_core.c and portdrv_pci.c into portdrv.c to make it easier
        to find things (Bjorn Helgaas)
      
      - Allow AER service only for Root Ports & RCECs so portdrv can successfully
        bind to other devices that have AER but lack MSI (which they don't need
        for AER), which allows power management for those devices (Bjorn Helgaas)
      
      * pci/portdrv:
        PCI/portdrv: Allow AER service only for Root Ports & RCECs
        PCI/portdrv: Unexport pcie_port_service_register(), pcie_port_service_unregister()
        PCI/portdrv: Move private things to portdrv.c
        PCI/portdrv: Squash into portdrv.c
      93030501
    • B
      Merge branch 'pci/pm-agp' · ec7c9a68
      Bjorn Helgaas 提交于
      - Convert AGP efficeon, intel, amd-k7, ati, nvidia to generic power
        management (Bjorn Helgaas)
      
      * pci/pm-agp:
        agp/via: Update to DEFINE_SIMPLE_DEV_PM_OPS()
        agp/sis: Update to DEFINE_SIMPLE_DEV_PM_OPS()
        agp/amd64: Update to DEFINE_SIMPLE_DEV_PM_OPS()
        agp/nvidia: Convert to generic power management
        agp/ati: Convert to generic power management
        agp/amd-k7: Convert to generic power management
        agp/intel: Convert to generic power management
        agp/efficeon: Convert to generic power management
      ec7c9a68
    • B
      Merge branch 'pci/pm' · e1f2d153
      Bjorn Helgaas 提交于
      - Remove unused 'state' parameter to pci_legacy_suspend_late() (Bjorn
        Helgaas)
      
      * pci/pm:
        PCI/PM: Remove unused 'state' parameter to pci_legacy_suspend_late()
      e1f2d153
    • B
      Merge branch 'pci/misc' · eae10935
      Bjorn Helgaas 提交于
      - Use METHOD_NAME__UID instead of plain string to make it easier to find
        all uses (Yipeng Zou)
      
      * pci/misc:
        PCI/ACPI: Use METHOD_NAME__UID instead of plain string
      eae10935
    • B
      Merge branch 'pci/hotplug' · 84c34829
      Bjorn Helgaas 提交于
      - Enable pciehp by default if USB4 is enabled because USB4/Thunderbolt
        tunneling depends on native PCIe hotplug (Albert Zhou)
      
      - Make sure pciehp binds only to Downstream Ports, not Upstream Ports
        (Rafael J. Wysocki)
      
      - Remove unused get_mode1_ECC_cap callback in shpchp (Ian Cowan)
      
      - Enable pciehp Command Completed Interrupt only if supported to reduce
        confusion when looking at lspci output (Pali Rohár)
      
      * pci/hotplug:
        PCI: pciehp: Enable Command Completed Interrupt only if supported
        PCI: shpchp: Remove unused get_mode1_ECC_cap callback
        PCI: acpiphp: Avoid setting is_hotplug_bridge for PCIe Upstream Ports
        PCI/portdrv: Set PCIE_PORT_SERVICE_HP for Root and Downstream Ports only
        PCI: pciehp: Enable by default if USB4 enabled
      84c34829
    • B
      Merge branch 'pci/enumeration' · 51ef4873
      Bjorn Helgaas 提交于
      - Only read/write PCIe Link 2 registers for devices with Links and PCIe
        Capability version >= 2 (Maciej W. Rozycki)
      
      - Revert a patch that cleared PCI_STATUS during enumeration because it
        broke Linux guests on Apple's virtualization framework (Bjorn Helgaas)
      
      - Assign PCI domain IDs using IDAs so IDs can be easily reused after
        loading/unloading host bridge drivers (Pali Rohár)
      
      - Fix pci_device_is_present(), which previously always returned "false" for
        VFs because their vendor ID is always 0xfff (Michael S. Tsirkin)
      
      - Check for alloc failure in pci_request_irq() (Zeng Heng)
      
      * pci/enumeration:
        PCI: Check for alloc failure in pci_request_irq()
        PCI: Fix pci_device_is_present() for VFs by checking PF
        PCI: Assign PCI domain IDs by ida_alloc()
        Revert "PCI: Clear PCI_STATUS when setting up device"
        PCI: Access Link 2 registers only for devices with Links
      51ef4873
    • B
      Merge branch 'pci/doe' · cad4f43f
      Bjorn Helgaas 提交于
      - Fix calculation of DOE length to account for the "0 means 2^18 DWORDs"
        special case (Li Ming)
      
      * pci/doe:
        PCI/DOE: Fix maximum data object length miscalculation
      cad4f43f
    • B
      x86/PCI: Use pr_info() when possible · d91482bb
      Bjorn Helgaas 提交于
      Use pr_info() and similar when possible.  No functional change intended.
      
      Link: https://lore.kernel.org/r/20221209205131.GA1726524@bhelgaasSuggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      d91482bb
    • B
      x86/PCI: Fix log message typo · 2bfa89fa
      Bjorn Helgaas 提交于
      Add missing word in the log message:
      
        - ... so future kernels can this automatically
        + ... so future kernels can do this automatically
      Suggested-by: NAndy Shevchenko <andriy.shevchenko@intel.com>
      Link: https://lore.kernel.org/r/20221208190341.1560157-5-helgaas@kernel.orgSigned-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      2bfa89fa
    • B
      x86/PCI: Tidy E820 removal messages · 00904bf6
      Bjorn Helgaas 提交于
      These messages:
      
        clipped [mem size 0x00000000 64bit] to [mem size 0xfffffffffffa0000 64bit] for e820 entry [mem 0x0009f000-0x000fffff]
      
      aren't as useful as they could be because (a) the resource is often
      IORESOURCE_UNSET, so we print the size instead of the start/end and (b) we
      print the available resource even if it is empty after removing the E820
      entry.
      
      Print the available space by hand to avoid the IORESOURCE_UNSET problem and
      only if it's non-empty.  No functional change intended.
      
      Link: https://lore.kernel.org/r/20221208190341.1560157-4-helgaas@kernel.orgSigned-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      00904bf6
    • B
      PCI: Skip allocate_resource() if too little space available · 5c5fb3c3
      Bjorn Helgaas 提交于
      pci_bus_alloc_from_region() allocates MMIO space by iterating through all
      the resources available on the bus.  The available resource might be
      reduced if the caller requires 32-bit space or we're avoiding BIOS or E820
      areas.
      
      Don't bother calling allocate_resource() if we need more space than is
      available in this resource.  This prevents some pointless and annoying
      messages about avoided areas.
      
      Link: https://lore.kernel.org/r/20221208190341.1560157-3-helgaas@kernel.orgSigned-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      5c5fb3c3
    • B
      efi/x86: Remove EfiMemoryMappedIO from E820 map · 07eab090
      Bjorn Helgaas 提交于
      Firmware can use EfiMemoryMappedIO to request that MMIO regions be mapped
      by the OS so they can be accessed by EFI runtime services, but should have
      no other significance to the OS (UEFI r2.10, sec 7.2).  However, most
      bootloaders and EFI stubs convert EfiMemoryMappedIO regions to
      E820_TYPE_RESERVED entries, which prevent Linux from allocating space from
      them (see remove_e820_regions()).
      
      Some platforms use EfiMemoryMappedIO entries for PCI MMCONFIG space and PCI
      host bridge windows, which means Linux can't allocate BAR space for
      hot-added devices.
      
      Remove large EfiMemoryMappedIO regions from the E820 map to avoid this
      problem.
      
      Leave small (< 256KB) EfiMemoryMappedIO regions alone because on some
      platforms, these describe non-window space that's included in host bridge
      _CRS.  If we assign that space to PCI devices, they don't work.  On the
      Lenovo X1 Carbon, this leads to suspend/resume failures.
      
      The previous solution to the problem of allocating BARs in these regions
      was to add pci_crs_quirks[] entries to disable E820 checking for these
      machines (see d341838d ("x86/PCI: Disable E820 reserved region clipping
      via quirks")):
      
        Acer   DMI_PRODUCT_NAME    Spin SP513-54N
        Clevo  DMI_BOARD_NAME      X170KM-G
        Lenovo DMI_PRODUCT_VERSION *IIL*
      
      Florent reported the BAR allocation issue on the Clevo NL4XLU.  We could
      add another quirk for the NL4XLU, but I hope this generic change can solve
      it for many machines without having to add quirks.
      
      This change has been tested on Clevo X170KM-G (Konrad) and Lenovo Ideapad
      Slim 3 (Matt) and solves the problem even when overriding the existing
      quirks by booting with "pci=use_e820".
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=216565     Clevo NL4XLU
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=206459#c78 Clevo X170KM-G
      Link: https://bugzilla.redhat.com/show_bug.cgi?id=1868899    Ideapad Slim 3
      Link: https://bugzilla.redhat.com/show_bug.cgi?id=2029207    X1 Carbon
      Link: https://lore.kernel.org/r/20221208190341.1560157-2-helgaas@kernel.orgReported-by: NFlorent DELAHAYE <kernelorg@undead.fr>
      Tested-by: NKonrad J Hambrick <kjhambrick@gmail.com>
      Tested-by: NMatt Hansen <2lprbe78@duck.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      07eab090
    • B
      PCI/portdrv: Allow AER service only for Root Ports & RCECs · d8d2b65a
      Bjorn Helgaas 提交于
      Previously portdrv allowed the AER service for any device with an AER
      capability (assuming Linux had control of AER) even though the AER service
      driver only attaches to Root Port and RCECs.
      
      Because get_port_device_capability() included AER for non-RP, non-RCEC
      devices, we tried to initialize the AER IRQ even though these devices
      don't generate AER interrupts.
      
      Intel DG1 and DG2 discrete graphics cards contain a switch leading to a
      GPU.  The switch supports AER but not MSI, so initializing an AER IRQ
      failed, and portdrv failed to claim the switch port at all.  The GPU itself
      could be suspended, but the switch could not be put in a low-power state
      because it had no driver.
      
      Don't allow the AER service on non-Root Port, non-Root Complex Event
      Collector devices.  This means we won't enable Bus Mastering if the device
      doesn't require MSI, the AER service will not appear in sysfs, and the AER
      service driver will not bind to the device.
      
      Link: https://lore.kernel.org/r/20221207084105.84947-1-mika.westerberg@linux.intel.com
      Link: https://lore.kernel.org/r/20221210002922.1749403-1-helgaas@kernel.orgBased-on-patch-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      d8d2b65a
  2. 07 12月, 2022 1 次提交
  3. 06 12月, 2022 4 次提交
  4. 24 11月, 2022 2 次提交
  5. 23 11月, 2022 12 次提交