[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56a33219fc336c26b8ef9d8de1a3d50893a7b7d1.camel@linux.intel.com>
Date: Thu, 05 Dec 2019 09:32:09 -0800
From: Todd Brandt <todd.e.brandt@...ux.intel.com>
To: Zhang Rui <rui.zhang@...el.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux ACPI <linux-acpi@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
"Brandt, Todd E" <todd.e.brandt@...el.com>
Subject: Re: [PATCH] ACPI: PM: Avoid attaching ACPI PM domain to certain
devices
On Wed, 2019-12-04 at 22:04 +0800, Zhang Rui wrote:
> On Wed, 2019-12-04 at 02:54 +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> > Certain ACPI-enumerated devices represented as platform devices in
> > Linux, like fans, require special low-level power management
> > handling
> > implemented by their drivers that is not in agreement with the ACPI
> > PM domain behavior. That leads to problems with managing ACPI fans
> > during system-wide suspend and resume.
> >
> > For this reason, make acpi_dev_pm_attach() skip the affected
> > devices
> > by adding a list of device IDs to avoid to it and putting the IDs
> > of
> > the affected devices into that list.
> >
> > Fixes: e5cc8ef31267 (ACPI / PM: Provide ACPI PM callback routines
> > for
> > subsystems)
> > Reported-by: Zhang Rui <rui.zhang@...el.com>
> > Cc: 3.10+ <stable@...r.kernel.org> # 3.10+
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > ---
> >
> > Rui,
> >
> > Please test this on the machine(s) affected by the fan
> > suspend/resume
> > issues.
>
> Sure, Todd and I will re-run stress test with this patch applied when
> 5.5-rc1 released.
I've applied it 5.4.0 and will do a full stress test run this weekend
in the lab (where 7 out of 20 machines have this issue). The kernel
will be called "5.4.0-acpifanfix", and the data should be ready Sunday
Dec 8.
This is the issue I'll test for:
https://bugzilla.kernel.org/show_bug.cgi?id=204321
>
> thanks,
> rui
>
> >
> > I don't really see any cleaner way to address this problem, because
> > the
> > ACPI PM domain should not be used with the devices in question even
> > if
> > the driver that binds to them is not loaded.
> >
> > Cheers,
> > Rafael
> >
> > ---
> > drivers/acpi/device_pm.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > Index: linux-pm/drivers/acpi/device_pm.c
> > ===================================================================
> > --- linux-pm.orig/drivers/acpi/device_pm.c
> > +++ linux-pm/drivers/acpi/device_pm.c
> > @@ -1314,9 +1314,19 @@ static void acpi_dev_pm_detach(struct de
> > */
> > int acpi_dev_pm_attach(struct device *dev, bool power_on)
> > {
> > + /*
> > + * Skip devices whose ACPI companions match the device IDs
> > below,
> > + * because they require special power management handling
> > incompatible
> > + * with the generic ACPI PM domain.
> > + */
> > + static const struct acpi_device_id special_pm_ids[] = {
> > + {"PNP0C0B", }, /* Generic ACPI fan */
> > + {"INT3404", }, /* Fan */
> > + {}
> > + };
> > struct acpi_device *adev = ACPI_COMPANION(dev);
> >
> > - if (!adev)
> > + if (!adev || !acpi_match_device_ids(adev, special_pm_ids))
> > return 0;
> >
> > /*
> >
> >
> >
>
>
Powered by blists - more mailing lists