linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <shangw@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: [PATCH 3/8] powerpc/pci: Override pcibios_stop_dev()
Date: Fri,  5 Jul 2013 10:57:29 +0800	[thread overview]
Message-ID: <1372993054-25730-4-git-send-email-shangw@linux.vnet.ibm.com> (raw)
In-Reply-To: <1372993054-25730-1-git-send-email-shangw@linux.vnet.ibm.com>

The patch overrides the weak function pcibios_stop_dev() to destroy
the EEH device and cache while stopping and removing the corresponding
PCI device.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/pci-hotplug.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/pci-hotplug.c b/arch/powerpc/kernel/pci-hotplug.c
index 3f60880..617d2df 100644
--- a/arch/powerpc/kernel/pci-hotplug.c
+++ b/arch/powerpc/kernel/pci-hotplug.c
@@ -22,6 +22,18 @@
 #include <asm/eeh.h>
 
 /**
+ * pcibios_stop_dev - stop the PCI device
+ * @dev: the indicated PCI device
+ *
+ * Stop the PCI device. The function should be called before
+ * stopping the specified PCI device.
+ */
+void pcibios_stop_dev(struct pci_dev *dev)
+{
+	eeh_remove_device(dev, 1);
+}
+
+/**
  * __pcibios_remove_pci_devices - remove all devices under this bus
  * @bus: the indicated PCI bus
  * @purge_pe: destroy the PE on removal of PCI devices
@@ -45,7 +57,6 @@ void __pcibios_remove_pci_devices(struct pci_bus *bus, int purge_pe)
 		 pci_domain_nr(bus),  bus->number);
 	list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) {
 		pr_debug("     * Removing %s...\n", pci_name(dev));
-		eeh_remove_bus_device(dev, purge_pe);
 		pci_stop_and_remove_bus_device(dev);
 	}
 }
-- 
1.7.5.4

  parent reply	other threads:[~2013-07-05  2:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05  2:57 [PATCH v1 0/8] EEH Followup Fixes (II) Gavin Shan
2013-07-05  2:57 ` [PATCH 1/8] PCI: Add pcibios_stop_dev() Gavin Shan
2013-07-05  3:08   ` Benjamin Herrenschmidt
2013-07-05 18:49   ` Bjorn Helgaas
2013-07-05 22:36     ` Benjamin Herrenschmidt
2013-07-05 22:49       ` Bjorn Helgaas
2013-07-05 23:05         ` Benjamin Herrenschmidt
2013-07-05  2:57 ` [PATCH 2/8] powerpc/eeh: Export functions for hotplug Gavin Shan
2013-07-05  2:57 ` Gavin Shan [this message]
2013-07-05  2:57 ` [PATCH 4/8] PCI/hotplug: Needn't remove EEH cache again Gavin Shan
2013-07-05 18:51   ` Bjorn Helgaas
2013-07-05  2:57 ` [PATCH 5/8] powerpc/eeh: Keep PE during hotplug Gavin Shan
2013-07-05  2:57 ` [PATCH 6/8] powerpc/eeh: Tranverse EEH devices with safe mode Gavin Shan
2013-07-05  2:57 ` [PATCH 7/8] powerpc/pci: Partial hotplug support Gavin Shan
2013-07-05  2:57 ` [PATCH 8/8] powerpc/eeh: Support partial hotplug Gavin Shan

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=1372993054-25730-4-git-send-email-shangw@linux.vnet.ibm.com \
    --to=shangw@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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).