[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65a7feb3ea48f_3b8e294bf@dwillia2-xfh.jf.intel.com.notmuch>
Date: Wed, 17 Jan 2024 08:22:11 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: Bartosz Golaszewski <brgl@...ev.pl>, Kalle Valo <kvalo@...nel.org>, "David
S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Rob Herring
<robh+dt@...nel.org>, Krzysztof Kozlowski
<krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio
<konrad.dybcio@...aro.org>, Catalin Marinas <catalin.marinas@....com>, "Will
Deacon" <will@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, "Heiko
Stuebner" <heiko@...ech.de>, Jernej Skrabec <jernej.skrabec@...il.com>,
"Chris Morgan" <macromorgan@...mail.com>, Linus Walleij
<linus.walleij@...aro.org>, Geert Uytterhoeven <geert+renesas@...der.be>,
Arnd Bergmann <arnd@...db.de>, Neil Armstrong <neil.armstrong@...aro.org>,
NĂcolas F . R . A . Prado <nfraprado@...labora.com>,
Marek Szyprowski <m.szyprowski@...sung.com>, Peng Fan <peng.fan@....com>,
Robert Richter <rrichter@....com>, Dan Williams <dan.j.williams@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>, Terry Bowman
<terry.bowman@....com>, Lukas Wunner <lukas@...ner.de>, Huacai Chen
<chenhuacai@...nel.org>, Alex Elder <elder@...aro.org>, Srini Kandagatla
<srinivas.kandagatla@...aro.org>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Abel Vesa <abel.vesa@...aro.org>
CC: <linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-pci@...r.kernel.org>, Bartosz Golaszewski
<bartosz.golaszewski@...aro.org>
Subject: RE: [PATCH 4/9] PCI: create platform devices for child OF nodes of
the port node
Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> In order to introduce PCI power-sequencing, we need to create platform
> devices for child nodes of the port node. They will get matched against
> the pwrseq drivers (if one exists) and then the actual PCI device will
> reuse the node once it's detected on the bus.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
[..]
> diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
> index d749ea8250d6..77be0630b7b3 100644
> --- a/drivers/pci/remove.c
> +++ b/drivers/pci/remove.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <linux/pci.h>
> #include <linux/module.h>
> +#include <linux/of_platform.h>
> #include "pci.h"
>
> static void pci_free_resources(struct pci_dev *dev)
> @@ -18,11 +19,11 @@ static void pci_stop_dev(struct pci_dev *dev)
> pci_pme_active(dev, false);
>
> if (pci_dev_is_added(dev)) {
> -
> device_release_driver(&dev->dev);
> pci_proc_detach_device(dev);
> pci_remove_sysfs_dev_files(dev);
> of_pci_remove_node(dev);
> + of_platform_depopulate(&dev->dev);
>
> pci_dev_assign_added(dev, false);
Why is pci_stop_dev() not in strict reverse order of
pci_bus_add_device()? I see that pci_dev_assign_added() was already not
in reverse "add" order before your change, but I otherwise would have
expected of_platform_depopulate() before of_pci_remove_node() (assumed
paired with of_pci_make_dev_node()).
Powered by blists - more mailing lists