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

From: Bjorn Helgaas

Date: Mon Nov 23 2026 - 18:46:08 EST


On Sun, Nov 22, 2026 at 06:56:48PM +0100, Lukas Wunner wrote:
> 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.

Are the ratelimit knobs useful for devices other than Root Ports and
RCiEPs with an AER Capability? That's the only place we get
interrupts, isn't it? I guess DPC also?

> > 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.

Oh, right, thanks!