From: Nathan Lynch <nathanl@linux.ibm.com>
To: Sam Bobroff <sbobroff@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, Oliver O'Halloran <oohall@gmail.com>
Subject: Re: [PATCH v3 2/3] powerpc/eeh: fix pseries_eeh_configure_bridge()
Date: Fri, 24 Apr 2020 11:17:17 -0500 [thread overview]
Message-ID: <871rocluya.fsf@linux.ibm.com> (raw)
In-Reply-To: <3944bede1195f62f887436a3e4150b06894d6e62.1587704308.git.sbobroff@linux.ibm.com>
Sam Bobroff <sbobroff@linux.ibm.com> writes:
> 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 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
> index 893ba3f562c4..9ea1c06a78cd 100644
> --- a/arch/powerpc/platforms/pseries/eeh_pseries.c
> +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
> @@ -607,6 +607,8 @@ static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
>
> if (!ret)
> return ret;
> + if (ret < 0)
> + break;
>
> /*
> * If RTAS returns a delay value that's above 100ms, cut it
> @@ -627,7 +629,7 @@ static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
>
> pr_warn("%s: Unable to configure bridge PHB#%x-PE#%x (%d)\n",
> __func__, pe->phb->global_number, pe->addr, ret);
> - return ret;
> + return rtas_error_rc(ret);
See my response to patch #1. I think the best you can do here right now
is return -EINVAL for -3, -EIO for any other (unarchitected) negative
value.
next prev parent reply other threads:[~2020-04-24 16:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 4:58 [PATCH v3 0/3] powerpc/eeh: Release EEH device state synchronously Sam Bobroff
2020-04-24 4:58 ` [PATCH v3 1/3] powerpc/rtas: Export rtas_error_rc Sam Bobroff
2020-04-24 16:07 ` Nathan Lynch
2020-04-28 2:27 ` Sam Bobroff
2020-04-28 3:31 ` Michael Ellerman
2020-04-24 4:58 ` [PATCH v3 2/3] powerpc/eeh: fix pseries_eeh_configure_bridge() Sam Bobroff
2020-04-24 16:17 ` Nathan Lynch [this message]
2020-04-24 4:58 ` [PATCH v3 3/3] powerpc/eeh: Release EEH device state synchronously 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=871rocluya.fsf@linux.ibm.com \
--to=nathanl@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.com \
--cc=sbobroff@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.