linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* a small problem about pci_stop_and_remove_bus_device() function
@ 2012-08-29  8:58 Yijing Wang
  2012-09-13 16:43 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Yijing Wang @ 2012-08-29  8:58 UTC (permalink / raw)
  To: Bjorn Helgaas, PCI; +Cc: Jiang Liu, Hanjun Guo

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-15  3:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29  8:58 a small problem about pci_stop_and_remove_bus_device() function Yijing Wang
2012-09-13 16:43 ` Bjorn Helgaas
2012-09-15  3:22   ` Jiang Liu

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).