Re: [PATCH 4/4] PCI/AER: Hide the "aer" sysfs directory on devices without AER

From: Lukas Wunner

Date: Sun Nov 22 2026 - 12:57:06 EST


On Fri, Nov 20, 2026 at 07:31:25PM -0600, Bjorn Helgaas wrote:
> On Tue, Nov 10, 2026 at 03:56:14PM -0600, Yazen Ghannam wrote:
> > aer_attr_group is a named group, so sysfs creates an "aer" directory for
> > every PCI device. aer_attrs_are_visible() hides the attributes when the
> > device has no aer_info.
> >
> > But this doesn't apply to the entire "aer" group. So devices without AER
> > end up having an empty "aer" directory.
>
> This applies specifically to the ratelimit-related things in the "aer"
> directory, right?

Yes.

> If so I might amend this commit log to mention
> that, since Lukas's subsequent "PCI/AER: Enable baseline capability
> error reporting" enables aer_dev_correctable, aer_dev_fatal, etc even
> for non-AER PCIe devices.

With that subsequent patch, the "aer" subdirectory with the ratelimiting
knobs appears below every PCIe device (unless allocation of aer_info fails
due to high memory pressure), but not e.g. below Conventional PCI devices.

> At least they're internal so they're easier to change than
> "aer_dev_correctable" etc, which are even more unfortunate now.

Baseline capability error reporting depends on presence of an AER-capable
Root Port, hence is still in a sense AER-related.

Thanks,

Lukas