From: Manivannan Sadhasivam <mani@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Alex Elder <elder@linaro.org>,
Srini Kandagatla <srinivas.kandagatla@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>, Abel Vesa <abel.vesa@linaro.org>,
Lukas Wunner <lukas@wunner.de>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org,
linux-pci@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: Re: Re: [RFC 8/9] PCI/pwrctl: add PCI power control core code
Date: Wed, 14 Feb 2024 19:58:56 +0530 [thread overview]
Message-ID: <20240214142856.GG4618@thinkpad> (raw)
In-Reply-To: <ycorratd3jxzg5nijbpgk6hrlgq5rl66cttfg7wv4oyyxivfm4@kfbhrlytiafe>
On Fri, Feb 09, 2024 at 05:43:56PM -0600, Bjorn Andersson wrote:
> On Thu, Feb 08, 2024 at 05:02:01PM +0530, Manivannan Sadhasivam wrote:
> > On Fri, Feb 02, 2024 at 10:52:11AM -0600, Bjorn Andersson wrote:
> > > On Fri, Feb 02, 2024 at 10:11:42AM +0100, Bartosz Golaszewski wrote:
> > > > On Fri, Feb 2, 2024 at 4:53 AM Bjorn Andersson <andersson@kernel.org> wrote:
> > > [..]
> > > > > > + break;
> > > > > > + }
> > > > > > +
> > > > > > + return NOTIFY_DONE;
> > > > > > +}
> > > > > > +
> > > > > > +int pci_pwrctl_device_enable(struct pci_pwrctl *pwrctl)
> > > > >
> > > > > This function doesn't really "enable the device", looking at the example
> > > > > driver it's rather "device_enabled" than "device_enable"...
> > > > >
> > > >
> > > > I was also thinking about pci_pwrctl_device_ready() or
> > > > pci_pwrctl_device_prepared().
> > >
> > > I like both of these.
> > >
> > > I guess the bigger question is how the flow would look like in the event
> > > that we need to power-cycle the attached PCIe device, e.g. because
> > > firmware has gotten into a really bad state.
> > >
> > > Will we need an operation that removes the device first, and then cut
> > > the power, or do we cut the power and then call unprepared()?
> > >
> >
> > Currently, we don't power cycle while resetting the devices. Most of the drivers
> > just do a software reset using some register writes. Part of the reason for
> > that is, the drivers themselves don't control the power to the devices and there
> > would be no way to let the parent know about the firmware crash.
> >
>
> I don't know what the appropriate design for this is, but we do have a
> need for being able to recover from this state by the means of
> power-cycling the device.
>
> If it's not possible to let the device do it (in any fashion), then
> perhaps a user-space-assisted model is needed?
>
> Turning on power is an important first step, but please do consider the
> full scope of the known problem space.
>
Agree. I'm not ignoring this issue, but this is a separate topic IMO (or an
incremental change). Because, power cycling the device in the event of a
firmware crash or even upon receiving AER Fatal errors is valid for platforms
not making use of this driver and an existing issue.
For sure we can accomodate that functionality in this series itself, but that's
going to drag this series to many releases (you already know how long it took
for us to get to the current state). Instead, I'd recommend to merge it in its
current form and have Bartosz or someone work on incremental features such as:
1. Runtime/System PM
2. Resetting the device in the event of fw crash etc...
Wdyt?
- Mani
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-02-14 14:29 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 15:55 [RFC 0/9] power: sequencing: implement the subsystem and add first users Bartosz Golaszewski
2024-02-01 15:55 ` [RFC 1/9] of: provide a cleanup helper for OF nodes Bartosz Golaszewski
2024-02-01 22:18 ` Rob Herring
2024-02-04 19:18 ` Bartosz Golaszewski
2024-02-01 15:55 ` [RFC 2/9] arm64: dts: qcom: qrb5165-rb5: model the PMU of the QCA6391 Bartosz Golaszewski
2024-02-02 4:34 ` Bjorn Andersson
2024-02-02 4:59 ` Dmitry Baryshkov
2024-02-02 16:09 ` Bjorn Andersson
2024-02-02 13:23 ` Bartosz Golaszewski
2024-02-02 16:41 ` Bjorn Andersson
2024-02-02 16:47 ` Bjorn Andersson
2024-02-05 7:51 ` Krzysztof Kozlowski
2024-02-01 15:55 ` [RFC 3/9] power: sequencing: new subsystem Bartosz Golaszewski
2024-02-01 22:25 ` Rob Herring
2024-02-01 15:55 ` [RFC 4/9] power: pwrseq: add a driver for the QCA6390 PMU module Bartosz Golaszewski
2024-02-02 4:54 ` Bjorn Andersson
2024-02-02 7:48 ` Dmitry Baryshkov
2024-02-02 9:01 ` Bartosz Golaszewski
2024-02-01 15:55 ` [RFC 5/9] Bluetooth: qca: use the power sequencer for QCA6390 Bartosz Golaszewski
2024-02-01 15:55 ` [RFC 6/9] PCI: create platform devices for child OF nodes of the port node Bartosz Golaszewski
2024-02-02 2:59 ` Bjorn Andersson
2024-02-02 9:03 ` Bartosz Golaszewski
2024-02-01 15:55 ` [RFC 7/9] PCI: hold the rescan mutex when scanning for the first time Bartosz Golaszewski
2024-02-01 15:55 ` [RFC 8/9] PCI/pwrctl: add PCI power control core code Bartosz Golaszewski
2024-02-02 3:53 ` Bjorn Andersson
2024-02-02 9:11 ` Bartosz Golaszewski
2024-02-02 16:52 ` Bjorn Andersson
2024-02-07 16:26 ` Bartosz Golaszewski
2024-02-09 9:04 ` Lukas Wunner
2024-02-09 9:38 ` Manivannan Sadhasivam
2024-02-08 11:32 ` Manivannan Sadhasivam
2024-02-09 23:43 ` Bjorn Andersson
2024-02-14 14:28 ` Manivannan Sadhasivam [this message]
2024-02-14 15:46 ` Bartosz Golaszewski
2024-02-01 15:55 ` [RFC 9/9] PCI/pwrctl: add a PCI power control driver for power sequenced devices Bartosz Golaszewski
2024-02-02 4:03 ` Bjorn Andersson
2024-02-02 13:05 ` Bartosz Golaszewski
2024-02-09 23:37 ` Bjorn Andersson
2024-02-02 0:40 ` [RFC 0/9] power: sequencing: implement the subsystem and add first users Bjorn Andersson
2024-02-02 8:53 ` Bartosz Golaszewski
2024-02-02 4:10 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240214142856.GG4618@thinkpad \
--to=mani@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elder@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=lukas@wunner.de \
--cc=marcel@holtmann.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).