Return-Path: Received: from sonic311-13.consmr.mail.bf2.yahoo.com (sonic311-13.consmr.mail.bf2.yahoo.com [74.6.131.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 409Vqc3zPlzF22J for ; Tue, 27 Mar 2018 23:36:08 +1100 (AEDT) Date: Tue, 27 Mar 2018 12:35:58 +0000 (UTC) From: T T To: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, Michael Ellerman Message-ID: <674188442.347898.1522154158190@mail.yahoo.com> In-Reply-To: <877epxk983.fsf@concordia.ellerman.id.au> References: <20180326150233.23089-1-npiggin@gmail.com> <877epxk983.fsf@concordia.ellerman.id.au> Subject: Re: [PATCH] powerpc/powernv/nvram: opal_nvram_write handle unknown OPAL errors MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_347897_10136288.1522154158189" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------=_Part_347897_10136288.1522154158189 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable unscribed me=C2=A0 On =E2=80=8ETuesday=E2=80=8E, =E2=80=8EMarch=E2=80=8E =E2=80=8E27=E2=80= =8E, =E2=80=8E2018=E2=80=8E =E2=80=8E05=E2=80=8E:=E2=80=8E34=E2=80=8E:=E2= =80=8E30=E2=80=8E =E2=80=8EAM=E2=80=8E =E2=80=8EPDT, Michael Ellerman wrote: =20 =20 Nicholas Piggin writes: > opal_nvram_write currently just assumes success if it encounters an > error other than OPAL_BUSY or OPAL_BUSY_EVENT. Have it return -EIO > on other errors instead. Does that ever happen with current skiboot? Even if it doesn't I think I'm inclined to tag this for stable. cheers > diff --git a/arch/powerpc/platforms/powernv/opal-nvram.c b/arch/powerpc/p= latforms/powernv/opal-nvram.c > index 9db4398ded5d..13bf625dc3e8 100644 > --- a/arch/powerpc/platforms/powernv/opal-nvram.c > +++ b/arch/powerpc/platforms/powernv/opal-nvram.c > @@ -59,6 +59,8 @@ static ssize_t opal_nvram_write(char *buf, size_t count= , loff_t *index) >=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 if (rc =3D=3D OPAL_BUSY_EVENT= ) >=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 opal_poll_= events(NULL); >=C2=A0 =C2=A0=C2=A0=C2=A0 } > +=C2=A0=C2=A0=C2=A0 if (rc) > +=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 return -EIO; >=C2=A0 =C2=A0=C2=A0=C2=A0 *index +=3D count; >=C2=A0 =C2=A0=C2=A0=C2=A0 return count; >=C2=A0 } > --=20 > 2.16.1 =20 ------=_Part_347897_10136288.1522154158189 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
unscribed me 

=20
=20
On =E2=80=8ETuesday=E2=80=8E, =E2=80=8EMarch=E2=80= =8E =E2=80=8E27=E2=80=8E, =E2=80=8E2018=E2=80=8E =E2=80=8E05=E2=80=8E:=E2= =80=8E34=E2=80=8E:=E2=80=8E30=E2=80=8E =E2=80=8EAM=E2=80=8E =E2=80=8EPDT, M= ichael Ellerman <mpe@ellerman.id.au> wrote:


Nicholas Piggin <npiggin@gmail.= com> writes:

&g= t; opal_nvram_write currently just assumes success if it encounters an
<= /div>
> error other than OPAL_BUSY or OPAL_BUSY_EVENT. H= ave it return -EIO
> on other errors instead.<= br>

Does that ever happen = with current skiboot?

= Even if it doesn't I think I'm inclined to tag this for stable.

cheers
=
> diff --git a/arch/powerpc/platforms/powernv= /opal-nvram.c b/arch/powerpc/platforms/powernv/opal-nvram.c
> index 9db4398ded5d..13bf625dc3e8 100644
> --- a/arch/powerpc/platforms/powernv/opal-nvram.c
> +++ b/arch/powerpc/platforms/powernv/opal-nvram.c
> @@ -59,6 +59,8 @@ static ssize_t opal_nvram_write= (char *buf, size_t count, loff_t *index)
>&nbs= p;         if (rc =3D=3D OPAL_BUSY_EVENT)
=
>          &nb= sp;   opal_poll_events(NULL);
> = ;     }
> +    i= f (rc)
> +       = ; return -EIO;
>      *ind= ex +=3D count;
>      retu= rn count;
>  }
= > --
> 2.16.1
------=_Part_347897_10136288.1522154158189--