From: Sam Bobroff <sbobroff@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Oliver O'Halloran <oohall@gmail.com>
Subject: [PATCH 1/4] powerpc/eeh: fix pseries_eeh_configure_bridge()
Date: Mon, 30 Mar 2020 15:56:39 +1100 [thread overview]
Message-ID: <074529df859e2aae5ee1683e567f708b65e3558d.1585544197.git.sbobroff@linux.ibm.com> (raw)
In-Reply-To: <cover.1585544197.git.sbobroff@linux.ibm.com>
If a device is hot unplgged during EEH recovery, it's possible for the
RTAS call to ibm,configure-pe in pseries_eeh_configure() to return
parameter error (-3), however negative return values are not checked
for and this leads to an infinite loop.
Fix this by correctly bailing out on negative values.
Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
---
arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index 893ba3f562c4..c4ef03bec0de 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -605,7 +605,7 @@ static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
config_addr, BUID_HI(pe->phb->buid),
BUID_LO(pe->phb->buid));
- if (!ret)
+ if (ret <= 0)
return ret;
/*
--
2.22.0.216.g00a2a96fc9
next prev parent reply other threads:[~2020-03-30 5:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 4:56 [PATCH 0/4] powerpc/eeh: Release EEH device state synchronously Sam Bobroff
2020-03-30 4:56 ` Sam Bobroff [this message]
2020-04-03 4:19 ` [PATCH 1/4] powerpc/eeh: fix pseries_eeh_configure_bridge() Oliver O'Halloran
2020-03-30 4:56 ` [PATCH 2/4] powerpc/eeh: Release EEH device state synchronously Sam Bobroff
2020-04-03 4:51 ` Oliver O'Halloran
2020-04-08 6:15 ` Sam Bobroff
2020-03-30 4:56 ` [PATCH 3/4] powerpc/eeh: Remove workaround from eeh_add_device_late() Sam Bobroff
2020-04-03 6:08 ` Oliver O'Halloran
2020-04-08 6:21 ` Sam Bobroff
2020-04-08 6:53 ` Oliver O'Halloran
2020-04-15 6:44 ` Sam Bobroff
2020-03-30 4:56 ` [PATCH 4/4] powerpc/eeh: Clean up edev cleanup for VFs Sam Bobroff
2020-04-03 5:45 ` Oliver O'Halloran
2020-04-08 6:33 ` Sam Bobroff
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=074529df859e2aae5ee1683e567f708b65e3558d.1585544197.git.sbobroff@linux.ibm.com \
--to=sbobroff@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.com \
/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).