From: Yijing Wang <wangyijing@huawei.com>
To: Bjorn Helgaas <bhelgaas@google.com>, PCI <linux-pci@vger.kernel.org>
Cc: Jiang Liu <jiang.liu@huawei.com>, Hanjun Guo <guohanjun@huawei.com>
Subject: a small problem about pci_stop_and_remove_bus_device() function
Date: Wed, 29 Aug 2012 16:58:15 +0800 [thread overview]
Message-ID: <503DD9A7.70007@huawei.com> (raw)
Hi Bjorn,
The drivers/pci/remove.c now is so clean after applied series "[PATCH v2 00/16] Clean up drivers/pci/remove.c"(very good ^_^).
I have a small problem about pci_stop_and_remove_bus_device() function. Traditionally, pci_bus is removed after its pci bridge stop.
But now pci_bus is remove before its pci brdige. So If I use pci_bus_type notifier, I can't identify pci_dev whether is bridge(by pci_dev->subordinate)
when notifier arrives.
What about move pci_remove_bus after stop pci bridge?
82 if (bus) {
83 list_for_each_entry_safe_reverse(child, tmp,
84 &bus->devices, bus_list)
85 pci_stop_and_remove_bus_device(child);
86
87 }
88
89 pci_stop_dev(dev);
90 if (bus) {
91 pci_remove_bus(bus);
92 dev->subordinate = NULL;
93 }
94 pci_destroy_dev(dev);
--
Thanks!
Yijing
next reply other threads:[~2012-08-29 8:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 8:58 Yijing Wang [this message]
2012-09-13 16:43 ` a small problem about pci_stop_and_remove_bus_device() function Bjorn Helgaas
2012-09-15 3:22 ` Jiang Liu
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=503DD9A7.70007@huawei.com \
--to=wangyijing@huawei.com \
--cc=bhelgaas@google.com \
--cc=guohanjun@huawei.com \
--cc=jiang.liu@huawei.com \
--cc=linux-pci@vger.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).