[PATCH] powernv/opal: Handle OPAL_WRONG_STATE error from OPAL fails
Mukesh Ojha
mukesh02 at linux.vnet.ibm.com
Wed Dec 21 16:24:09 AEDT 2016
On Tuesday 20 December 2016 07:46 PM, Vipin K Parashar wrote:
> Added check for OPAL_WRONG_STATE error code returned from OPAL.
> Currently Linux flashes "unexpected error" over console for this
> error. This will avoid throwing such message and return I/O error
> for such OPAL failures.
>
> Signed-off-by: Vipin K Parashar <vipin at linux.vnet.ibm.com>
> ---
> arch/powerpc/platforms/powernv/opal.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
> index 2822935..ab91d53 100644
> --- a/arch/powerpc/platforms/powernv/opal.c
> +++ b/arch/powerpc/platforms/powernv/opal.c
> @@ -866,9 +866,10 @@ int opal_error_code(int rc)
> case OPAL_NO_MEM: return -ENOMEM;
> case OPAL_PERMISSION: return -EPERM;
>
> - case OPAL_UNSUPPORTED: return -EIO;
> - case OPAL_HARDWARE: return -EIO;
> - case OPAL_INTERNAL_ERROR: return -EIO;
> + case OPAL_UNSUPPORTED:
> + case OPAL_HARDWARE:
> + case OPAL_INTERNAL_ERROR:
> + case OPAL_WRONG_STATE: return -EIO;
Looks good.
Reviewed-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
> default:
> pr_err("%s: unexpected OPAL error %d\n", __func__, rc);
> return -EIO;
More information about the Linuxppc-dev
mailing list