linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: ruscur@russell.cc, mpe@ellerman.id.au,
	Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: [PATCH v2 2/3] powerpc/eeh: Don't remove passed VFs
Date: Wed,  2 Mar 2016 13:28:51 +1100	[thread overview]
Message-ID: <1456885732-23070-3-git-send-email-gwshan@linux.vnet.ibm.com> (raw)
In-Reply-To: <1456885732-23070-1-git-send-email-gwshan@linux.vnet.ibm.com>

When we have partial hotplug as part of the error recovery on PF,
the VFs that are bound with vfio-pci driver will experience hotplug.
That's not allowed.

This checks if the VF PE is passed or not. If it does, we leave
the VF without removing it.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
---
 arch/powerpc/kernel/eeh_driver.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 6c59de8..fb6207d 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -455,6 +455,9 @@ static void *eeh_rmv_device(void *data, void *userdata)
 	if (driver) {
 		eeh_pcid_put(dev);
 		if (removed &&
+		    eeh_pe_passed(edev->pe))
+			return NULL;
+		if (removed &&
 		    driver->err_handler &&
 		    driver->err_handler->error_detected &&
 		    driver->err_handler->slot_reset)
-- 
2.1.0

  parent reply	other threads:[~2016-03-02  2:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02  2:28 [PATCH v2 0/3] powerpc/eeh: Enhancement to EEH for VF Gavin Shan
2016-03-02  2:28 ` [PATCH v2 1/3] powerpc/eeh: Don't propagate error to guest Gavin Shan
2016-03-02  2:28 ` Gavin Shan [this message]
2016-03-02  2:28 ` [PATCH v2 3/3] powerpc/eeh: Synchronize recovery in host/guest Gavin Shan
2016-03-02  3:03 ` [PATCH v2 0/3] powerpc/eeh: Enhancement to EEH for VF Michael Ellerman
2016-03-02  6:33   ` Gavin Shan
2016-03-04  0:01   ` Gavin Shan
2016-03-04  0:09     ` 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=1456885732-23070-3-git-send-email-gwshan@linux.vnet.ibm.com \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=ruscur@russell.cc \
    /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).