[PATCH] powerpc/powernv/nvram: opal_nvram_write handle unknown OPAL errors

T T tath76 at yahoo.com
Tue Mar 27 23:35:58 AEDT 2018


 unscribed me 

    On ‎Tuesday‎, ‎March‎ ‎27‎, ‎2018‎ ‎05‎:‎34‎:‎30‎ ‎AM‎ ‎PDT, Michael Ellerman <mpe at ellerman.id.au> wrote:  
 
 Nicholas Piggin <npiggin at gmail.com> 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/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)
>          if (rc == OPAL_BUSY_EVENT)
>              opal_poll_events(NULL);
>      }
> +    if (rc)
> +        return -EIO;
>      *index += count;
>      return count;
>  }
> -- 
> 2.16.1
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20180327/19b8054d/attachment-0001.html>


More information about the Linuxppc-dev mailing list