From: Gavin Shan <shangw@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: [PATCH 03/10] powerpc/pci: Override pcibios_release_device()
Date: Thu, 18 Jul 2013 10:14:13 +0800 [thread overview]
Message-ID: <1374113660-15347-4-git-send-email-shangw@linux.vnet.ibm.com> (raw)
In-Reply-To: <1374113660-15347-1-git-send-email-shangw@linux.vnet.ibm.com>
The patch overrides pcibios_release_device() to release EEH
resources (EEH cache, unbinding EEH device) for the indicated PCI
device.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
arch/powerpc/kernel/pci-hotplug.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/pci-hotplug.c b/arch/powerpc/kernel/pci-hotplug.c
index 3f60880..3dab2f2 100644
--- a/arch/powerpc/kernel/pci-hotplug.c
+++ b/arch/powerpc/kernel/pci-hotplug.c
@@ -22,6 +22,17 @@
#include <asm/eeh.h>
/**
+ * pcibios_release_device - release PCI device
+ * @dev: PCI device
+ *
+ * The function is called before releasing the indicated PCI device.
+ */
+void pcibios_release_device(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
--
1.7.5.4
next prev parent reply other threads:[~2013-07-18 2:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 2:14 [PATCH v2 0/10] EEH Followup Fixes (II) Gavin Shan
2013-07-18 2:14 ` [PATCH 01/10] powerpc/eeh: Remove reference to PCI device Gavin Shan
2013-07-18 2:14 ` [PATCH 02/10] powerpc/eeh: Export functions for hotplug Gavin Shan
2013-07-18 2:14 ` Gavin Shan [this message]
2013-07-18 2:14 ` [PATCH 04/10] PCI/hotplug: Needn't remove EEH cache again Gavin Shan
2013-07-18 2:14 ` [PATCH 05/10] powerpc/eeh: Keep PE during hotplug Gavin Shan
2013-07-18 2:14 ` [PATCH 06/10] powerpc/eeh: Tranverse EEH devices with safe mode Gavin Shan
2013-07-18 2:14 ` [PATCH 07/10] powerpc/pci: Partial hotplug support Gavin Shan
2013-07-18 2:14 ` [PATCH 08/10] powerpc/eeh: Support partial hotplug Gavin Shan
2013-07-18 2:14 ` [PATCH 09/10] powerpc/eeh: Don't use pci_dev during BAR restore Gavin Shan
2013-07-18 2:14 ` [PATCH 10/10] powerpc/eeh: Fix unbalanced enable for IRQ 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=1374113660-15347-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).