1. 15 Jan, 2024 16 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/rcar' · 67b9ef22
      Bjorn Helgaas authored
      - Replace of_device.h with explicit of.h include to untangle header usage
        (Rob Herring)
      
      - Add DT and driver support for optional miniPCIe 1.5v and 3.3v regulators
        on KingFisher (Wolfram Sang)
      
      * pci/controller/rcar:
        PCI: rcar-host: Add support for optional regulators
        dt-bindings: PCI: rcar-pci-host: Add optional regulators
        PCI: rcar-gen4: Replace of_device.h with explicit of.h include
      67b9ef22
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/mediatek' · 1b6069f5
      Bjorn Helgaas authored
      - Clear MSI interrupt status before handler to avoid missing MSIs that
        occur after the handler (qizhong cheng)
      
      - Update mediatek-gen3 translation window setup to handle MMIO space that
        is not a power of two in size (Jianjun Wang)
      
      * pci/controller/mediatek:
        PCI: mediatek-gen3: Fix translation window size calculation
        PCI: mediatek: Clear interrupt status before dispatching handler
      1b6069f5
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/layerscape' · 1800c660
      Bjorn Helgaas authored
      - Add suspend/resume support for Layerscape LS1043a, including
        software-managed PME_Turn_Off and transitions between L0, L2/L3_Ready
        Link states (Frank Li)
      
      * pci/controller/layerscape:
        PCI: layerscape: Add suspend/resume for ls1043a
        PCI: layerscape(ep): Rename pf_* as pf_lut_*
        PCI: layerscape: Add suspend/resume for ls1021a
        PCI: layerscape: Add function pointer for exit_from_l2()
      1800c660
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/kirin' · 921e097e
      Bjorn Helgaas authored
      - Use devm_kasprintf() to dynamically allocate clock names, removing need
        for an intermediate buffer (Christophe JAILLET)
      
      * pci/controller/kirin:
        PCI: kirin: Use devm_kasprintf() to dynamically allocate clock names
      921e097e
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/keystone' · 186ce88c
      Bjorn Helgaas authored
      - Hold power management references to all PHYs while enabling them to avoid
        a race when one provides clocks to others (Siddharth Vadapalli)
      
      * pci/controller/keystone:
        PCI: keystone: Fix race condition when initializing PHYs
      186ce88c
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/dwc' · 787c72b1
      Bjorn Helgaas authored
      - Convert fu740 CONFIG_PCIE_FU740 dependency from SOC_SIFIVE to ARCH_SIFIVE
        (Conor Dooley)
      
      - Align iATU mapping for endpoint MSI-X (Niklas Cassel)
      
      - Drop "host_" prefix from struct dw_pcie_host_ops members (Yoshihiro
        Shimoda)
      
      - Drop "ep_" prefix from struct dw_pcie_ep_ops members (Yoshihiro Shimoda)
      
      - Rename struct dw_pcie_ep_ops.func_conf_select() to .get_dbi_offset() to
        be more descriptive (Yoshihiro Shimoda)
      
      - Add Endpoint DBI accessors to encapsulate offset lookups (Yoshihiro
        Shimoda)
      
      - Cast iproc and rcar-gen4 of_device_get_match_data() results to uintptr_t
        to avoid clang "cast to smaller integer type" warnings (Justin Stitt,
        Yoshihiro Shimoda)
      
      * pci/controller/dwc:
        PCI: rcar-gen4: Fix -Wvoid-pointer-to-enum-cast error
        PCI: iproc: Fix -Wvoid-pointer-to-enum-cast warning
        PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers
        PCI: dwc: Rename .func_conf_select to .get_dbi_offset in struct dw_pcie_ep_ops
        PCI: dwc: Rename .ep_init to .init in struct dw_pcie_ep_ops
        PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members
        PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support
        PCI: dwc: Convert SOC_SIFIVE to ARCH_SIFIVE
      787c72b1
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/cadence' · 78fe51fc
      Bjorn Helgaas authored
      - Add j721e DT and driver support for 'num-lanes' for devices that support
        x1, x2, or x4 Links (Matt Ranostay)
      
      - Add j721e DT compatible strings and driver support for j784s4 (Matt Ranostay)
      
      - Make TI J721E Kconfig depend on ARCH_K3 since the hardware is specific to
        those TI SoC parts (Peter Robinson)
      
      * pci/controller/cadence:
        PCI: j721e: Make TI J721E depend on ARCH_K3
        PCI: j721e: Add TI J784S4 PCIe configuration
        PCI: j721e: Add PCIe 4x lane selection support
        PCI: j721e: Add per platform maximum lane settings
        dt-bindings: PCI: ti,j721e-pci-*: Add j784s4-pci-* compatible strings
        dt-bindings: PCI: ti,j721e-pci-*: Add checks for num-lanes
      78fe51fc
    • Bjorn Helgaas's avatar
      Merge branch 'pci/controller/broadcom' · 6f77f0ac
      Bjorn Helgaas authored
      - Add DT property "brcm,clkreq-mode" and driver support for different
        CLKREQ# modes (Jim Quinlan)
      
      * pci/controller/broadcom:
        PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device
        dt-bindings: PCI: brcmstb: Add property "brcm,clkreq-mode"
      6f77f0ac
    • Bjorn Helgaas's avatar
      Merge branch 'pci/virtualization' · c94df621
      Bjorn Helgaas authored
      - Add ACS quirk for more Zhaoxin Root Ports (LeoLiuoc)
      
      * pci/virtualization:
        PCI: Add ACS quirk for more Zhaoxin Root Ports
      c94df621
    • Bjorn Helgaas's avatar
      Merge branch 'pci/switchtec' · d6f5bcc2
      Bjorn Helgaas authored
      - Do dma_mrpc cleanup during switchtec_pci_remove() to match its devm
        ioremapping in switchtec_pci_probe().  Previously the cleanup was done in
        stdev_release(), which used stale pointers if stdev->cdev happened to be
        open when the PCI device was removed (Daniel Stodden)
      
      * pci/switchtec:
        PCI: switchtec: Fix stdev_release() crash after surprise hot remove
      d6f5bcc2
    • Bjorn Helgaas's avatar
      Merge branch 'pci/resource' · 5a4af2ca
      Bjorn Helgaas authored
      - Restructure pci_dev_for_each_resource() to avoid computing the address of
        an out-of-bounds array element (the bounds check was performed later so
        the element was never actually *read*, but it's nicer to avoid even
        computing an out-of-bounds address) (Andy Shevchenko)
      
      * pci/resource:
        PCI: Avoid potential out-of-bounds read in pci_dev_for_each_resource()
      5a4af2ca
    • Bjorn Helgaas's avatar
      Merge branch 'pci/p2pdma' · 18c3850f
      Bjorn Helgaas authored
      - Remove documentation for obsolete pci_p2pdma_map_sg() (Tadeusz Struk)
      
      * pci/p2pdma:
        PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg()
      18c3850f
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration-logging' · 564af7a5
      Bjorn Helgaas authored
      - Log device type (Root Port, Switch Port, etc) during enumeration (Bjorn
        Helgaas)
      
      - Log resource names (BAR 0, VF BAR 0, bridge window, etc) consistently
        instead of a mix of names and "reg 0x10" (Puranjay Mohan, Bjorn Helgaas)
      
      - Log bridges before devices below the bridges (Bjorn Helgaas)
      
      * pci/enumeration-logging:
        PCI: Log bridge info when first enumerating bridge
        PCI: Log bridge windows conditionally
        PCI: Supply bridge device, not secondary bus, to read window details
        PCI: Move pci_read_bridge_windows() below individual window accessors
        PCI: Use resource names in PCI log messages
        PCI: Update BAR # and window messages
        PCI: Log device type during enumeration
      564af7a5
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' · 78e5ad79
      Bjorn Helgaas authored
      - Convert pci-host-common.c platform .remove() callback to .remove_new()
        returning 'void' since it's not useful to return error codes here (Uwe
        Kleine-König)
      
      - Log a message about updating AMD USB controller class code (so dwc3, not
        xhci, claims it) only when we actually change it (Guilherme G.  Piccoli)
      
      - Use PCI_HEADER_TYPE_* instead of literals in x86, powerpc, SCSI lpfc
        (Ilpo Järvinen)
      
      - Clean up open-coded PCIBIOS return code mangling (Ilpo Järvinen)
      
      - Fix 64GT/s effective data rate calculation to use 1b/1b encoding rather
        than the 8b/10b or 128b/130b used by lower rates (Ilpo Järvinen)
      
      * pci/enumeration:
        PCI: Fix 64GT/s effective data rate calculation
        x86/pci: Clean up open-coded PCIBIOS return code mangling
        scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal
        powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal
        x86/pci: Use PCI_HEADER_TYPE_* instead of literals
        PCI: Only override AMD USB controller if required
        PCI: host-generic: Convert to platform remove callback returning void
      78e5ad79
    • Bjorn Helgaas's avatar
      Merge branch 'pci/ecam' · 996e337f
      Bjorn Helgaas authored
      - Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS (Bjorn Helgaas)
      
      - Add MMCONFIG/ECAM debug logging (Bjorn Helgaas)
      
      - Rename 'MMCONFIG' to 'ECAM' to match spec usage (Bjorn Helgaas)
      
      * pci/ecam:
        x86/pci: Reorder pci_mmcfg_arch_map() definition before calls
        x86/pci: Return pci_mmconfig_add() failure early
        x86/pci: Comment pci_mmconfig_insert() obscure MCFG dependency
        x86/pci: Rename pci_mmcfg_check_reserved() to pci_mmcfg_reserved()
        x86/pci: Rename acpi_mcfg_check_entry() to acpi_mcfg_valid_entry()
        x86/pci: Rename 'MMCONFIG' to 'ECAM', use pr_fmt
        x86/pci: Add MCFG debug logging
        x86/pci: Reword ECAM EfiMemoryMappedIO logging to avoid 'reserved'
        x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS
      996e337f
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aer' · f04e5285
      Bjorn Helgaas authored
      - Log AER errors as "Correctable" (not "Corrected") or "Uncorrectable" to
        match spec terminology (Bjorn Helgaas)
      
      - Decode Requester ID when no error info found instead of printing the raw
        hex value (Bjorn Helgaas)
      
      * pci/aer:
        PCI/AER: Use explicit register sizes for struct members
        PCI/AER: Decode Requester ID when no error info found
        PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors
      f04e5285
  2. 11 Jan, 2024 2 commits
  3. 09 Jan, 2024 3 commits
  4. 06 Jan, 2024 8 commits
  5. 02 Jan, 2024 4 commits
  6. 18 Dec, 2023 1 commit
  7. 17 Dec, 2023 1 commit
  8. 16 Dec, 2023 1 commit
  9. 15 Dec, 2023 4 commits
    • Bjorn Helgaas's avatar
      PCI: Log bridge info when first enumerating bridge · 95140c2f
      Bjorn Helgaas authored
      Log bridge secondary/subordinate bus and window information at the same
      time we log the bridge BARs, just after discovering the bridge and before
      scanning the bridge's secondary bus.  This logs the bridge and downstream
      devices in a more logical order:
      
        - pci 0000:00:01.0: [8086:1901] type 01 class 0x060400
        - pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200
        - pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff]
        - pci 0000:00:01.0: PCI bridge to [bus 01]
        - pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
      
        + pci 0000:00:01.0: [8086:1901] type 01 class 0x060400
        + pci 0000:00:01.0: PCI bridge to [bus 01]
        + pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
        + pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200
        + pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff]
      
      Note that we read the windows into a temporary struct resource that is
      thrown away, not into the resources in the struct pci_bus.
      
      The windows may be adjusted after we know what downstream devices require,
      and those adjustments are logged as they are made.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      95140c2f
    • Bjorn Helgaas's avatar
      PCI: Log bridge windows conditionally · 63c6ebb2
      Bjorn Helgaas authored
      Previously pci_read_bridge_io(), pci_read_bridge_mmio(), and
      pci_read_bridge_mmio_pref() unconditionally logged the bridge window
      resource.  A future change will call these functions earlier and more
      often.  Add a "log" parameter so callers can control whether to generate
      the log message.  No functional change intended.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      63c6ebb2
    • Bjorn Helgaas's avatar
      PCI: Supply bridge device, not secondary bus, to read window details · 281e1f13
      Bjorn Helgaas authored
      Previously we logged information about devices *below* the bridge before
      logging information about the bridge itself, e.g.,
      
        pci 0000:00:01.0: [8086:1901] type 01 class 0x060400
        pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200
        pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff]
        pci 0000:00:01.0: PCI bridge to [bus 01]
        pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
      
      This is partly because the bridge windows are read in this path:
      
        pci_scan_child_bus_extend
          for (devfn = 0; devfn < 256; devfn += 8)
            pci_scan_slot(bus, devfn)       # scan below bridge
          pcibios_fixup_bus(bus)
            pci_read_bridge_bases(bus)      # read bridge windows
              pci_read_bridge_io(bus)
      
      Remove the assumption that the secondary (child) pci_bus already exists by
      passing in the bridge device (instead of the pci_bus) and a resource
      pointer when reading bridge windows.  A future change can use this to log
      the bridge details before we enumerate the devices below the bridge.
      
      No functional change intended.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      281e1f13
    • Bjorn Helgaas's avatar
      PCI: Move pci_read_bridge_windows() below individual window accessors · 6f32099a
      Bjorn Helgaas authored
      Move pci_read_bridge_windows() below the functions that read the I/O,
      memory, and prefetchable memory windows, so pci_read_bridge_windows() can
      use them in the future.  No functional change intended.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      6f32099a