<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/pcie, branch linux-6.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-08-28T14:34:24Z</updated>
<entry>
<title>PCI/portdrv: Use is_pciehp instead of is_hotplug_bridge</title>
<updated>2025-08-28T14:34:24Z</updated>
<author>
<name>Lukas Wunner</name>
</author>
<published>2025-07-13T14:31:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9fae40f362a960d8a1ae84d9d1ec1a45e7bcb8c'/>
<id>urn:sha1:a9fae40f362a960d8a1ae84d9d1ec1a45e7bcb8c</id>
<content type='text'>
commit 1d60796a62f327cd9e0a6a0865ded7656d2c67f9 upstream.

The PCIe port driver erroneously creates a subdevice for hotplug on ACPI
slots which are handled by the ACPI hotplug driver.

Avoid by checking the is_pciehp flag instead of is_hotplug_bridge when
deciding whether to create a subdevice.  The latter encompasses ACPI slots
whereas the former doesn't.

The superfluous subdevice has no real negative impact, it occupies memory
and interrupt resources but otherwise just sits there waiting for
interrupts from the slot that are never signaled.

Fixes: f8415222837b ("PCI: Use cached copy of PCI_EXP_SLTCAP_HPC bit")
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: stable@vger.kernel.org # v4.7+
Link: https://patch.msgid.link/40d5a5fe8d40595d505949c620a067fa110ee85e.1752390102.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PCI/PTM: Build debugfs code only if CONFIG_DEBUG_FS is enabled</title>
<updated>2025-06-23T17:55:49Z</updated>
<author>
<name>Manivannan Sadhasivam</name>
</author>
<published>2025-06-08T03:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5aa326a6a2ff0a7e7c6e11777045e66704c2d5e4'/>
<id>urn:sha1:5aa326a6a2ff0a7e7c6e11777045e66704c2d5e4</id>
<content type='text'>
Otherwise, the following build error will happen for CONFIG_DEBUG_FS=n &amp;&amp;
CONFIG_PCIE_PTM=y:

  drivers/pci/pcie/ptm.c:498:25: error: redefinition of 'pcie_ptm_create_debugfs'
    498 | struct pci_ptm_debugfs *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
	|                         ^
  ./include/linux/pci.h:1915:2: note: previous definition is here
   1915 | *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
	|  ^
  drivers/pci/pcie/ptm.c:546:6: error: redefinition of 'pcie_ptm_destroy_debugfs'
    546 | void pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs)
	|      ^
  ./include/linux/pci.h:1918:1: note: previous definition is here
   1918 | pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs) { }
	|

Fixes: 132833405e61 ("PCI: Add debugfs support for exposing PTM context")
Reported-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Closes: https://lore.kernel.org/linux-pci/20250607025506.GA16607@sol
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Tested-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Link: https://patch.msgid.link/20250608033305.15214-1-manivannan.sadhasivam@linaro.org
</content>
</entry>
<entry>
<title>Merge branch 'pci/ptm-debugfs'</title>
<updated>2025-06-04T15:50:44Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2025-06-04T15:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db847adbf99f80088b5e545855c1bc7ea52973d1'/>
<id>urn:sha1:db847adbf99f80088b5e545855c1bc7ea52973d1</id>
<content type='text'>
- Add debugfs support for exposing DWC device-specific PTM context
  (Manivannan Sadhasivam)

* pci/ptm-debugfs:
  PCI: qcom-ep: Mask PTM_UPDATING interrupt
  PCI: dwc: Add debugfs support for PTM context
  PCI: dwc: Pass DWC PCIe mode to dwc_pcie_debugfs_init()
  PCI: Add debugfs support for exposing PTM context
</content>
</entry>
<entry>
<title>Merge branch 'pci/bwctrl'</title>
<updated>2025-06-04T15:49:49Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2025-06-04T15:49:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1acf6a5e7948cb6f7d5a8cda349532f67f346b4d'/>
<id>urn:sha1:1acf6a5e7948cb6f7d5a8cda349532f67f346b4d</id>
<content type='text'>
- Simplify link bandwidth controller by replacing the count of Link
  Bandwidth Management Status (LBMS) events with a PCI_LINK_LBMS_SEEN flag
  (Ilpo Järvinen)

- Update the Link Speed after retraining, since the Link Speed may have
  changed (Ilpo Järvinen)

* pci/bwctrl:
  PCI: Update Link Speed after retraining
  PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag
</content>
</entry>
<entry>
<title>PCI/ERR: Remove misleading TODO regarding kernel panic</title>
<updated>2025-05-30T17:21:19Z</updated>
<author>
<name>Manivannan Sadhasivam</name>
</author>
<published>2025-05-08T07:10:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b06d125e6280603a34d9064cd9c12748ca2edb04'/>
<id>urn:sha1:b06d125e6280603a34d9064cd9c12748ca2edb04</id>
<content type='text'>
A PCI device is just another peripheral in a system. So failure to
recover it, must not result in a kernel panic. So remove the TODO which
is quite misleading.

Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wilfred Mallawa &lt;wilfred.mallawa@wdc.com&gt;
Link: https://patch.msgid.link/20250508-pcie-reset-slot-v4-1-7050093e2b50@linaro.org
</content>
</entry>
<entry>
<title>PCI/AER: Add sysfs attributes for log ratelimits</title>
<updated>2025-05-23T16:11:45Z</updated>
<author>
<name>Jon Pan-Doh</name>
</author>
<published>2025-05-22T23:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4fe7398def6df344442b884d2288f80205cbd2d'/>
<id>urn:sha1:b4fe7398def6df344442b884d2288f80205cbd2d</id>
<content type='text'>
Allow userspace to read/write log ratelimits per device (including
enable/disable). Create aer/ sysfs directory to store them and any
future AER configs.

The new sysfs files are:

  /sys/bus/pci/devices/*/aer/correctable_ratelimit_burst
  /sys/bus/pci/devices/*/aer/correctable_ratelimit_interval_ms
  /sys/bus/pci/devices/*/aer/nonfatal_ratelimit_burst
  /sys/bus/pci/devices/*/aer/nonfatal_ratelimit_interval_ms

The default values are ratelimit_burst=10, ratelimit_interval_ms=5000, so
if we try to emit more than 10 messages in a 5 second period, some are
suppressed.

Update AER sysfs ABI filename to reflect the broader scope of AER sysfs
attributes (e.g. stats and ratelimits).

  Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats -&gt;
    sysfs-bus-pci-devices-aer

Tested using aer-inject[1]. Configured correctable log ratelimit to 5.
Sent 6 AER errors. Observed 5 errors logged while AER stats
(cat /sys/bus/pci/devices/&lt;dev&gt;/aer_dev_correctable) shows 6.

Disabled ratelimiting and sent 6 more AER errors. Observed all 6 errors
logged and accounted in AER stats (12 total errors).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git

[bhelgaas: note fatal errors are not ratelimited, "aer_report" -&gt;
"aer_info", replace ratelimit_log_enable toggle with *_ratelimit_interval_ms]

Signed-off-by: Karolina Stolarek &lt;karolina.stolarek@oracle.com&gt;
Signed-off-by: Jon Pan-Doh &lt;pandoh@google.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Link: https://patch.msgid.link/20250522232339.1525671-21-helgaas@kernel.org
</content>
</entry>
<entry>
<title>PCI/AER: Ratelimit correctable and non-fatal error logging</title>
<updated>2025-05-23T16:11:45Z</updated>
<author>
<name>Jon Pan-Doh</name>
</author>
<published>2025-05-22T23:21:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a57f2bfb4a5863f83087867c0e671f2418212d23'/>
<id>urn:sha1:a57f2bfb4a5863f83087867c0e671f2418212d23</id>
<content type='text'>
Spammy devices can flood kernel logs with AER errors and slow/stall
execution. Add per-device ratelimits for AER correctable and non-fatal
uncorrectable errors that use the kernel defaults (10 per 5s).  Logging of
fatal errors is not ratelimited.

There are two AER logging entry points:

  - aer_print_error() is used by DPC and native AER

  - pci_print_aer() is used by GHES and CXL

The native AER aer_print_error() case includes a loop that may log details
from multiple devices, which are ratelimited individually.  If we log
details for any device, we also log the Error Source ID from the Root Port
or RCEC.

If no such device details are found, we still log the Error Source from the
ERR_* Message, ratelimited by the Root Port or RCEC that received it.

The DPC aer_print_error() case is not ratelimited, since this only happens
for fatal errors.

The CXL pci_print_aer() case is ratelimited by the Error Source device.

The GHES pci_print_aer() case is via aer_recover_work_func(), which
searches for the Error Source device.  If the device is not found, there's
no per-device ratelimit, so we use a system-wide ratelimit that covers all
error types (correctable, non-fatal, and fatal).

Sargun at Meta reported internally that a flood of AER errors causes RCU
CPU stall warnings and CSD-lock warnings.

Tested using aer-inject[1]. Sent 11 AER errors. Observed 10 errors logged
while AER stats (cat /sys/bus/pci/devices/&lt;dev&gt;/aer_dev_correctable) show
true count of 11.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git

[bhelgaas: commit log, factor out trace_aer_event() and aer_print_rp_info()
changes to previous patches, enable Error Source logging if any downstream
detail will be printed, don't ratelimit fatal errors, "aer_report" -&gt;
"aer_info", "cor_log_ratelimit" -&gt; "correctable_ratelimit",
"uncor_log_ratelimit" -&gt; "nonfatal_ratelimit"]

Reported-by: Sargun Dhillon &lt;sargun@meta.com&gt;
Signed-off-by: Jon Pan-Doh &lt;pandoh@google.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Link: https://patch.msgid.link/20250522232339.1525671-19-helgaas@kernel.org
</content>
</entry>
<entry>
<title>PCI/AER: Simplify add_error_device()</title>
<updated>2025-05-23T16:11:45Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2025-05-22T23:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d72bae423004aa7b4d94c34a7fd0b48b64305a08'/>
<id>urn:sha1:d72bae423004aa7b4d94c34a7fd0b48b64305a08</id>
<content type='text'>
Return -ENOSPC error early so the usual path through add_error_device() is
the straightline code.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Link: https://patch.msgid.link/20250522232339.1525671-18-helgaas@kernel.org
</content>
</entry>
<entry>
<title>PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index</title>
<updated>2025-05-23T16:11:36Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2025-05-22T23:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94bc15c3484aa1dbbd01aee8f9eaa5dc347a01a8'/>
<id>urn:sha1:94bc15c3484aa1dbbd01aee8f9eaa5dc347a01a8</id>
<content type='text'>
Previously aer_get_device_error_info() and aer_print_error() took a pointer
to struct aer_err_info and a pointer to a pci_dev.  Typically the pci_dev
was one of the elements of the aer_err_info.dev[] array (DPC was an
exception, where the dev[] array was unused).

Convert aer_get_device_error_info() and aer_print_error() to take an index
into the aer_err_info.dev[] array instead.  A future patch will add
per-device ratelimit information, so the index makes it convenient to find
the ratelimit associated with the device.

To accommodate DPC, set info-&gt;dev[0] to the DPC port before using these
interfaces.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Link: https://patch.msgid.link/20250522232339.1525671-17-helgaas@kernel.org
</content>
</entry>
<entry>
<title>PCI/AER: Rename struct aer_stats to aer_info</title>
<updated>2025-05-23T16:02:33Z</updated>
<author>
<name>Karolina Stolarek</name>
</author>
<published>2025-05-22T23:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09683a6184ad6fd635831402316651392b56cc3a'/>
<id>urn:sha1:09683a6184ad6fd635831402316651392b56cc3a</id>
<content type='text'>
Update name to reflect the broader definition of structs/variables that are
stored (e.g. ratelimits). This is a preparatory patch for adding rate limit
support.

[bhelgaas: "aer_report" -&gt; "aer_info"]

Signed-off-by: Karolina Stolarek &lt;karolina.stolarek@oracle.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Tested-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Link: https://patch.msgid.link/20250522232339.1525671-16-helgaas@kernel.org
</content>
</entry>
</feed>
