<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/probe.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-03-12T17:14:23Z</updated>
<entry>
<title>Merge branch 'pci/sysfs'</title>
<updated>2024-03-12T17:14:23Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2024-03-12T17:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8de187056f10f31739cad3d7b66677415f79883'/>
<id>urn:sha1:b8de187056f10f31739cad3d7b66677415f79883</id>
<content type='text'>
- Compile pci-sysfs.c only if CONFIG_SYSFS=y, which reduces kernel size by
  ~120KB when it's disabled (Lukas Wunner)

- Remove obsolete pci_cleanup_rom() declaration (Lukas Wunner)

- Rework pci_dev_resource_resize_attr(n) macros to call a function instead
  of duplicating most of the body, which saves about 2.5KB of text (Ilpo
  Järvinen)

* pci/sysfs:
  PCI/sysfs: Demacrofy pci_dev_resource_resize_attr(n) functions
  PCI: Remove obsolete pci_cleanup_rom() declaration
  PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y

# Conflicts:
#	drivers/pci/Makefile
</content>
</entry>
<entry>
<title>PCI/ASPM: Save L1 PM Substates Capability for suspend/resume</title>
<updated>2024-03-12T16:53:45Z</updated>
<author>
<name>David E. Box</name>
</author>
<published>2024-02-23T20:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17423360a27ae58c1850f588bdd8013bbfcd250b'/>
<id>urn:sha1:17423360a27ae58c1850f588bdd8013bbfcd250b</id>
<content type='text'>
4ff116d0d5fd ("PCI/ASPM: Save L1 PM Substates Capability for
suspend/resume") restored the L1 PM Substates Capability after resume,
which reduced power consumption by making the ASPM L1.x states work after
resume.

a7152be79b62 ("Revert "PCI/ASPM: Save L1 PM Substates Capability for
suspend/resume"") reverted 4ff116d0d5fd because resume failed on some
systems, so power consumption after resume increased again.

a7152be79b62 mentioned that we restore L1 PM substate configuration even
though ASPM L1 may already be enabled. This is due the fact that the
pci_restore_aspm_l1ss_state() was called before pci_restore_pcie_state().

Save and restore the L1 PM Substates Capability, following PCIe r6.1, sec
5.5.4 more closely by:

  1) Do not restore ASPM configuration in pci_restore_pcie_state() but
     do that after PCIe capability is restored in pci_restore_aspm_state()
     following PCIe r6.1, sec 5.5.4.

  2) If BIOS reenables L1SS, particularly L1.2, we need to clear the
     enables in the right order, downstream before upstream. Defer
     restoring the L1SS config until we are at the downstream component.
     Then update the config for both ends of the link in the prescribed
     order.

  3) Program ASPM L1 PM substate configuration before L1 enables.

  4) Program ASPM L1 PM substate enables last, after rest of the fields
     in the capability are programmed.

[bhelgaas: commit log, squash L1SS-related patches, do both LNKCTL restores
in pci_restore_pcie_state()]

Link: https://lore.kernel.org/r/20240128233212.1139663-3-david.e.box@linux.intel.com
Link: https://lore.kernel.org/r/20240128233212.1139663-4-david.e.box@linux.intel.com
Link: https://lore.kernel.org/r/20240223205851.114931-5-helgaas@kernel.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217321
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216782
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216877
Co-developed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Co-developed-by: David E. Box &lt;david.e.box@linux.intel.com&gt;
Reported-by: Koba Ko &lt;koba.ko@canonical.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: David E. Box &lt;david.e.box@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Tested-by: Tasev Nikola &lt;tasev.stefanoska@skynet.be&gt; # Asus UX305FA
Cc: Mark Enriquez &lt;enriquezmark36@gmail.com&gt;
Cc: Thomas Witt &lt;kernel@witt.link&gt;
Cc: Werner Sembach &lt;wse@tuxedocomputers.com&gt;
Cc: Vidya Sagar &lt;vidyas@nvidia.com&gt;
</content>
</entry>
<entry>
<title>PCI/ASPM: Move pci_configure_ltr() to aspm.c</title>
<updated>2024-03-07T20:29:08Z</updated>
<author>
<name>David E. Box</name>
</author>
<published>2024-02-23T20:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa84f4435a6202dd90248517f41e54bf3fb85bc5'/>
<id>urn:sha1:fa84f4435a6202dd90248517f41e54bf3fb85bc5</id>
<content type='text'>
The Latency Tolerance Reporting (LTR) mechanism supports the ASPM L1.2
state and is only configured when CONFIG_PCIEASPM is set.

Move pci_configure_ltr() and pci_bridge_reconfigure_ltr() into aspm.c since
they only build when CONFIG_PCIEASPM is set.  No functional change
intended.

Suggested-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Link: https://lore.kernel.org/r/20240128233212.1139663-2-david.e.box@linux.intel.com
[bhelgaas: commit log, split build change from function moves]
Link: https://lore.kernel.org/r/20240223205851.114931-2-helgaas@kernel.org
Signed-off-by: David E. Box &lt;david.e.box@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y</title>
<updated>2024-03-05T22:08:43Z</updated>
<author>
<name>Lukas Wunner</name>
</author>
<published>2023-10-30T12:32:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be9c3a4c8be13326e434d8817d6dda6c5d2835f5'/>
<id>urn:sha1:be9c3a4c8be13326e434d8817d6dda6c5d2835f5</id>
<content type='text'>
It is possible to enable CONFIG_PCI but disable CONFIG_SYSFS and for
space-constrained devices such as routers, such a configuration may
actually make sense.

However pci-sysfs.c is compiled even if CONFIG_SYSFS is disabled,
unnecessarily increasing the kernel's size.

To rectify that:

* Move pci_mmap_fits() to mmap.c.  It is not only needed by
  pci-sysfs.c, but also proc.c.

* Move pci_dev_type to probe.c and make it private.  It references
  pci_dev_attr_groups in pci-sysfs.c.  Make that public instead for
  consistency with pci_dev_groups, pcibus_groups and pci_bus_groups,
  which are likewise public and referenced by struct definitions in
  pci-driver.c and probe.c.

* Define pci_dev_groups, pci_dev_attr_groups, pcibus_groups and
  pci_bus_groups to NULL if CONFIG_SYSFS is disabled.  Provide empty
  static inlines for pci_{create,remove}_legacy_files() and
  pci_{create,remove}_sysfs_dev_files().

Result:

vmlinux size is reduced by 122996 bytes in my arm 32-bit test build.

Link: https://lore.kernel.org/r/85ca95ae8e4d57ccf082c5c069b8b21eb141846e.1698668982.git.lukas@wunner.de
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
</entry>
<entry>
<title>PCI: Log bridge info when first enumerating bridge</title>
<updated>2023-12-15T23:28:43Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2023-11-22T16:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95140c2fbfdf3b6ca98578e5bdbc82d9922f08b9'/>
<id>urn:sha1:95140c2fbfdf3b6ca98578e5bdbc82d9922f08b9</id>
<content type='text'>
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: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Log bridge windows conditionally</title>
<updated>2023-12-15T23:28:43Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2023-12-04T23:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63c6ebb294b7c708cc987d621e59499686650683'/>
<id>urn:sha1:63c6ebb294b7c708cc987d621e59499686650683</id>
<content type='text'>
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: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Supply bridge device, not secondary bus, to read window details</title>
<updated>2023-12-15T23:28:43Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2023-11-22T16:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=281e1f137a97dae4fe47a7d30635c5b83def790b'/>
<id>urn:sha1:281e1f137a97dae4fe47a7d30635c5b83def790b</id>
<content type='text'>
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 &lt; 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: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Move pci_read_bridge_windows() below individual window accessors</title>
<updated>2023-12-15T23:28:43Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2023-12-04T23:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f32099a91720b6d91da961858d48173f01a729d'/>
<id>urn:sha1:6f32099a91720b6d91da961858d48173f01a729d</id>
<content type='text'>
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: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Use resource names in PCI log messages</title>
<updated>2023-12-15T23:28:42Z</updated>
<author>
<name>Puranjay Mohan</name>
</author>
<published>2021-11-06T11:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc4e6f21c3f844ebc1c52b6920b8ec5dfc73f4e8'/>
<id>urn:sha1:dc4e6f21c3f844ebc1c52b6920b8ec5dfc73f4e8</id>
<content type='text'>
Use the pci_resource_name() to get the name of the resource and use it
while printing log messages.

[bhelgaas: rename to match struct resource * names, also use names in other
BAR messages]
Link: https://lore.kernel.org/r/20211106112606.192563-3-puranjay12@gmail.com
Signed-off-by: Puranjay Mohan &lt;puranjay12@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Log device type during enumeration</title>
<updated>2023-12-15T23:26:21Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2023-11-10T21:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35259ff188e028b8fee8f1e973d0a7466df76d13'/>
<id>urn:sha1:35259ff188e028b8fee8f1e973d0a7466df76d13</id>
<content type='text'>
Log the device type when enumeration a device.  Sample output changes:

  - pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
  + pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 conventional PCI endpoint

  - pci 0000:00:1c.0: [8086:a110] type 01 class 0x060400
  + pci 0000:00:1c.0: [8086:a110] type 01 class 0x060400 PCIe Root Port

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
</feed>
