All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/powernv/nvram: opal_nvram_write handle unknown OPAL errors
@ 2018-03-26 15:02 Nicholas Piggin
  2018-03-27  7:17 ` Vasant Hegde
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Nicholas Piggin @ 2018-03-26 15:02 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin

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.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/platforms/powernv/opal-nvram.c | 2 ++
 1 file changed, 2 insertions(+)

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

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

end of thread, other threads:[~2018-03-31 14:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 15:02 [PATCH] powerpc/powernv/nvram: opal_nvram_write handle unknown OPAL errors Nicholas Piggin
2018-03-27  7:17 ` Vasant Hegde
2018-03-27  7:38   ` Nicholas Piggin
2018-03-28 17:17     ` Vasant Hegde
2018-03-27 12:13 ` Michael Ellerman
2018-03-27 12:27   ` Nicholas Piggin
2018-03-27 12:35   ` T T
2018-03-29  4:27 ` Stewart Smith
2018-03-31 14:04 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.