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 03/11] powerpc/pci: Override pcibios_release_device()
Date: Tue, 23 Jul 2013 19:10:48 +0800	[thread overview]
Message-ID: <1374577856-1712-4-git-send-email-shangw@linux.vnet.ibm.com> (raw)
In-Reply-To: <1374577856-1712-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

  parent reply	other threads:[~2013-07-23 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 11:10 [PATCH v3 0/11] EEH Followup Fixes (II) Gavin Shan
2013-07-23 11:10 ` [PATCH 01/11] powerpc/eeh: Remove reference to PCI device Gavin Shan
2013-07-23 11:10 ` [PATCH 02/11] powerpc/eeh: Export functions for hotplug Gavin Shan
2013-07-23 11:10 ` Gavin Shan [this message]
2013-07-23 11:10 ` [PATCH 04/11] PCI/hotplug: Needn't remove EEH cache again Gavin Shan
2013-07-23 11:10 ` [PATCH 05/11] powerpc/eeh: Keep PE during hotplug Gavin Shan
2013-07-23 11:10 ` [PATCH 06/11] powerpc/eeh: Tranverse EEH devices with safe mode Gavin Shan
2013-07-23 11:10 ` [PATCH 07/11] powerpc/pci: Partial hotplug support Gavin Shan
2013-07-23 11:10 ` [PATCH 08/11] powerpc/eeh: Support partial hotplug Gavin Shan
2013-07-23 11:10 ` [PATCH 09/11] powerpc/eeh: Don't use pci_dev during BAR restore Gavin Shan
2013-07-23 11:10 ` [PATCH 10/11] powerpc/eeh: Fix unbalanced enable for IRQ Gavin Shan
2013-07-23 11:10 ` [PATCH 11/11] powerpc/eeh: Introdce flag to protect sysfs Gavin Shan
  -- strict thread matches above, loose matches on Subject: below --
2013-07-24  2:24 [PATCH v4 0/11] EEH Followup Fixes (II) Gavin Shan
2013-07-24  2:24 ` [PATCH 03/11] powerpc/pci: Override pcibios_release_device() 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=1374577856-1712-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).