From: Bjorn Helgaas <helgaas@kernel.org>
To: Huacai Chen <chenhuacai@gmail.com>
Cc: "Huacai Chen" <chenhuacai@loongson.cn>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
linux-pci@vger.kernel.org, "Jianmin Lv" <lvjianmin@loongson.cn>,
"Xuefeng Li" <lixuefeng@loongson.cn>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH V4 1/2] PCI: Omit pci_disable_device() in .shutdown()
Date: Thu, 2 Feb 2023 14:30:40 -0600 [thread overview]
Message-ID: <20230202203040.GA1964750@bhelgaas> (raw)
In-Reply-To: <CAAhV-H5fgG5uV5Zy6BsmwPpuhuog_L11TjWr4A82nbAcmHSj2w@mail.gmail.com>
On Thu, Feb 02, 2023 at 09:27:03PM +0800, Huacai Chen wrote:
> On Thu, Feb 2, 2023 at 2:17 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Wed, Feb 01, 2023 at 12:30:17PM +0800, Huacai Chen wrote:
> > > +static void pcie_portdrv_shutdown(struct pci_dev *dev)
> > > +{
> > > + if (pci_bridge_d3_possible(dev)) {
> > > + pm_runtime_forbid(&dev->dev);
> > > + pm_runtime_get_noresume(&dev->dev);
> > > + pm_runtime_dont_use_autosuspend(&dev->dev);
> > > + }
> > > +
> > > + pcie_port_device_remove(dev);
> >
> > Thanks! I guess you verified that this actually *does* call all the
> > port service .remove() methods, right? aer_remove(), dpc_remove(),
> > etc?
>
> I have tested, but aer_probe(), dpc_probe() doesn't get called at
> boot, so does aer_remove(), dpc_remove() when poweroff. I haven't got
> the root cause but I will continue to investigate.
We'll only call aer_probe() and dpc_probe() if the port supports those
services and the platform has granted us control of them. I don't
know if your platform does. It may support PCIe native hotplug
(pcie_hp_init()) or PME (pcie_pme_init()).
Bjorn
next prev parent reply other threads:[~2023-02-02 20:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 4:30 [PATCH V4 0/2] PCI: Resolve Loongson's LS7A PCI problems Huacai Chen
2023-02-01 4:30 ` [PATCH V4 1/2] PCI: Omit pci_disable_device() in .shutdown() Huacai Chen
2023-02-01 18:17 ` Bjorn Helgaas
2023-02-02 13:27 ` Huacai Chen
2023-02-02 20:30 ` Bjorn Helgaas [this message]
2023-02-03 4:00 ` Huacai Chen
2023-02-03 18:03 ` Bjorn Helgaas
2023-02-01 4:30 ` [PATCH V4 2/2] PCI: loongson: Improve the MRRS quirk for LS7A Huacai Chen
2023-02-01 18:57 ` [PATCH V4 0/2] PCI: Resolve Loongson's LS7A PCI problems Bjorn Helgaas
2023-02-02 13:28 ` Huacai Chen
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=20230202203040.GA1964750@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=chenhuacai@gmail.com \
--cc=chenhuacai@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=lorenzo.pieralisi@arm.com \
--cc=lvjianmin@loongson.cn \
--cc=robh@kernel.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).