[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221027060342.GA444@wunner.de>
Date: Thu, 27 Oct 2022 08:03:42 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Stefan Richter <stefanr@...6.in-berlin.de>,
Vaibhav Gupta <vaibhavgupta40@...il.com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
linux1394-devel@...ts.sourceforge.net, linux-pci@...r.kernel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v2] firewire: ohci: convert to generic power management
On Tue, Oct 25, 2022 at 04:25:21PM -0500, Bjorn Helgaas wrote:
> N.B. This changes the order of pmac_ohci_off() and pmac_ohci_on().
> Previously, pmac_ohci_off() was called *after* pci_save_state() and
> pci_set_power_state(), and this change calls it *before*.
>
> Similarly, pmac_ohci_on() was previously called *before*
> pci_set_power_state() and pci_restore_state() and this change calls it
> *after*.
Seems likely the ordering change may break things.
pmac_ohci_on/off() toggles PMAC_FTR_1394_ENABLE, which is defined as:
* enable/disable the firewire cell of an uninorth ASIC.
It sounds like it will cut power to the firewire controller and I'd
expect that pci_save_state() will then not be able to access config
space.
The only way to make this work is to define a struct dev_pm_domain
whose ->suspend_noirq callback first invokes the pci_bus_type
->suspend_noirq callback and then cuts power to the firewire cell
by calling pmac_ohci_off().
I've done something like this for Thunderbolt power management on
x86 Macs a few years back but didn't get around to upstream it so far:
https://github.com/l1k/linux/commit/4db7f0b1f5c9
Thanks,
Lukas
Powered by blists - more mailing lists