Re: [RFC Patch] pci: add power management for rtl8116af

From: Lukas Wunner

Date: Fri May 22 2026 - 03:22:24 EST


On Thu, May 21, 2026 at 11:38:27AM +0800, javen wrote:
> From: Javen Xu <javen_xu@xxxxxxxxxxxxxx>
>
> RTL8116af is a multi function card. But due to the hardware design, only
> function 0 and function 1(nic) are exposed to pci system. If the system
> want to enter s0idle or cpu need to enter c10 when suspend, function 2
> to 7 must be set to d3 and enable aspm. Function 5 and 6 are reserved,
> so we skip them.
[...]
> Just as the comments above, function 2 to 7 are hidden to pci system. So
> we have to set d3 and aspm through our private register, which is CSI. I
> have a discussion with netdev maintainer, and he thought this might be a
> question to pci system.
> I wonder whether this patch can be accepted here. Any feedback would be
> highly appreciated!

This is quite large for a quirk. Have you considered writing a small
driver instead to configure power state for the invisible/unused functions?
Or integrating the functionality into an existing driver?

Usually a quirk only makes sense if the system becomes unusable
or if a device falls off the bus without the quirk. It's not
suitable if the point is just to avoid unnecessarily high power
consumption.

Thanks,

Lukas