[PATCH] powernv/opal: Handle OPAL_WRONG_STATE error from OPAL fails
Vipin K Parashar
vipin at linux.vnet.ibm.com
Wed Dec 21 01:16:59 AEDT 2016
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;
default:
pr_err("%s: unexpected OPAL error %d\n", __func__, rc);
return -EIO;
--
2.7.4
More information about the Linuxppc-dev
mailing list