Re: [PATCH v2 2/2] hwmon: add initial support for AMD PROM21 xHCI temperature sensor
From: Michal Pecio
Date: Thu May 07 2026 - 05:08:48 EST
On Wed, 6 May 2026 16:36:49 -0500, Mario Limonciello wrote:
> > > The temperature register did not return a valid value while the
> > > xHCI PCI function was suspended in testing. Keep the existing
> > > behavior by default and allow temperature reads to wake the xHCI
> > > PCI device. Add an allow_pm_switch module parameter so users can
> > > disable that behavior; when disabled, reads do not wake the
> > > device and return -EAGAIN if it is suspended.
> >
> > Is such behavior useful?
> >
> > Maybe the driver could just disable runtime PM while it's loaded.
>
> I'd encourage what we do in amdgpu for dGPUs. The hwmon files will
> return an error code (I forget which code) when the device is in
> runtime PM when called. Don't explicitly wake it otherwise.
>
> This prevents someone installing a sensor monitoring application and
> that application "being the only thing" keeping the dGPU awake. If
> it's awake already for other reasons (like being used) then return
> valid data to the applications
Well, that's not a dGPU but an xHCI controller embedded in the chipset,
which chipset is more or less active all the time (includes bridges to
PCIe ports, some SATA controllers and mabe other things I forgot).
Is the saving from disabling xHCI significant for a desktop system?
Users may be interested in monitoring chipset temperature even while
not actively using USB.
I don't know what are the conditions to put GPUs into runtime suspend,
but a USB HC will be going in and out quite randomly, depending on
connected devices and their workload. You may end up needing to answer
people why their sensor only works when they turn on a webcam :)
Alternatively, would it be possible to bring a suspendend HC into D0,
read the temperature register and then put it back into D3hot without
bothering the USB layer to fully resume and suspend xHCI logic?
Regards,
Michal