linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powernv/opal: Handle OPAL_WRONG_STATE error from OPAL fails
@ 2016-12-20 14:16 Vipin K Parashar
  2016-12-21  5:24 ` Mukesh Ojha
  2017-01-27  0:17 ` Michael Ellerman
  0 siblings, 2 replies; 11+ messages in thread
From: Vipin K Parashar @ 2016-12-20 14:16 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Vipin K Parashar

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@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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-02-28  9:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-20 14:16 [PATCH] powernv/opal: Handle OPAL_WRONG_STATE error from OPAL fails Vipin K Parashar
2016-12-21  5:24 ` Mukesh Ojha
2017-01-27  0:17 ` Michael Ellerman
2017-01-27  6:48   ` Vipin K Parashar
2017-02-13  0:43     ` Michael Ellerman
2017-02-15  5:01       ` Stewart Smith
2017-02-15 20:12       ` Vipin K Parashar
2017-02-16  0:52         ` Stewart Smith
2017-02-20  5:03           ` Michael Ellerman
2017-02-23  3:52             ` Stewart Smith
2017-02-28  9:20               ` Vipin K Parashar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).