All of lore.kernel.org
 help / color / mirror / Atom feed
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: Fri, 3 Feb 2023 12:03:55 -0600	[thread overview]
Message-ID: <20230203180355.GA2030524@bhelgaas> (raw)
In-Reply-To: <CAAhV-H60bmz_oaWj5ZjM9mbcPtm4Z=8xu+FrEmJZ_Xer4WD8rA@mail.gmail.com>

On Fri, Feb 03, 2023 at 12:00:37PM +0800, Huacai Chen wrote:
> Hi, Bjorn,
> 
> On Fri, Feb 3, 2023 at 4:30 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> >
> > 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()).
>
> When I use pcie_ports=native to boot kernel, I verified that
> aer_remove() and pcie_pme_remove() are both called, while DPC and
> HOTPLUG are both not supported.

Great, thank you!

  reply	other threads:[~2023-02-03 18:04 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
2023-02-03  4:00         ` Huacai Chen
2023-02-03 18:03           ` Bjorn Helgaas [this message]
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=20230203180355.GA2030524@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.