Stewart Smith
99863c1bfd
rtc-opal: Fix handling of firmware error codes, prevent busy loops
...
commit 5b8b58063029f02da573120ef4dc9079822e3cda upstream.
According to the OPAL docs:
skiboot-5.2.5/doc/opal-api/opal-rtc-read-3.txt
skiboot-5.2.5/doc/opal-api/opal-rtc-write-4.txt
OPAL_HARDWARE may be returned from OPAL_RTC_READ or OPAL_RTC_WRITE and
this indicates either a transient or permanent error.
Prior to this patch, Linux was not dealing with OPAL_HARDWARE being a
permanent error particularly well, in that you could end up in a busy
loop.
This was not too hard to trigger on an AMI BMC based OpenPOWER machine
doing a continuous "ipmitool mc reset cold" to the BMC, the result of
that being that we'd get stuck in an infinite loop in
opal_get_rtc_time().
We now retry a few times before returning the error higher up the
stack.
Fixes: 16b1d26e77 ("rtc/tpo: Driver to support rtc and wakeup on PowerNV platform")
Cc: stable@vger.kernel.org # v3.19+
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com >
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:44:59 +01:00
..
2015-09-05 13:19:07 +02:00
2015-04-17 09:04:02 -04:00
2017-12-25 14:22:15 +01:00
2015-11-08 14:12:32 +01:00
2015-11-08 14:12:32 +01:00
2015-09-05 13:19:05 +02:00
2015-11-08 14:12:25 +01:00
2015-09-05 13:19:08 +02:00
2015-09-05 19:37:31 +02:00
2015-09-05 19:37:22 +02:00
2015-09-05 19:37:18 +02:00
2015-06-25 01:12:50 +02:00
2015-11-08 14:12:28 +01:00
2015-09-05 13:19:13 +02:00
2015-09-05 13:19:09 +02:00
2015-09-05 13:19:06 +02:00
2015-09-05 13:19:09 +02:00
2015-09-05 19:37:22 +02:00
2015-09-05 13:19:07 +02:00
2015-04-17 09:04:00 -04:00
2015-12-20 13:39:29 +01:00
2015-11-08 14:12:29 +01:00
2015-09-05 13:19:07 +02:00
2015-04-17 09:04:01 -04:00
2015-06-25 01:13:40 +02:00
2015-06-25 01:13:40 +02:00
2015-10-28 10:30:17 +09:00
2015-11-26 18:11:26 +01:00
2015-11-10 10:01:21 -08:00
2015-10-28 10:30:17 +09:00
2015-09-05 19:37:22 +02:00
2015-11-10 10:01:21 -08:00
2015-09-05 13:19:10 +02:00
2015-09-05 13:19:10 +02:00
2015-06-25 01:13:36 +02:00
2016-05-04 14:48:51 -07:00
2015-09-05 13:19:10 +02:00
2015-09-05 19:36:21 +02:00
2015-10-28 10:30:17 +09:00
2015-04-17 09:04:02 -04:00
2015-06-25 01:13:44 +02:00
2015-04-17 09:03:59 -04:00
2015-06-25 01:13:38 +02:00
2015-09-05 13:19:06 +02:00
2015-09-05 13:19:09 +02:00
2015-06-19 20:03:20 +02:00
2016-05-04 14:48:51 -07:00
2015-06-19 20:03:21 +02:00
2015-11-08 14:12:30 +01:00
2015-09-05 13:19:08 +02:00
2015-11-08 14:12:30 +01:00
2015-09-05 13:19:06 +02:00
2015-06-21 21:53:59 +02:00
2015-04-17 09:04:02 -04:00
2015-10-28 10:30:17 +09:00
2015-10-28 10:30:17 +09:00
2015-09-05 13:19:10 +02:00
2015-06-25 01:13:36 +02:00
2015-10-28 10:30:17 +09:00
2015-09-05 19:37:21 +02:00
2015-06-25 01:13:36 +02:00
2016-05-04 14:48:52 -07:00
2015-06-25 01:13:37 +02:00
2015-06-25 01:13:35 +02:00
2015-10-28 10:30:17 +09:00
2015-09-05 19:37:22 +02:00
2015-09-05 19:37:22 +02:00
2015-04-15 16:35:24 -07:00
2015-04-17 09:04:02 -04:00
2015-09-05 19:37:22 +02:00
2015-09-05 19:37:22 +02:00
2015-08-05 20:03:56 +08:00
2016-11-26 09:54:53 +01:00
2018-02-22 15:44:59 +01:00
2015-06-25 01:13:40 +02:00
2015-10-28 10:30:17 +09:00
2015-11-08 14:12:28 +01:00
2015-09-05 13:19:06 +02:00
2017-12-20 10:04:57 +01:00
2015-09-05 13:19:06 +02:00
2015-11-08 14:12:26 +01:00
2017-12-25 14:22:14 +01:00
2015-09-05 19:37:16 +02:00
2015-10-28 10:30:17 +09:00
2015-12-20 13:39:00 +01:00
2015-09-05 13:19:10 +02:00
2015-10-28 10:30:17 +09:00
2015-11-08 14:12:32 +01:00
2015-10-28 10:30:17 +09:00
2016-05-04 14:48:52 -07:00
2015-09-05 13:19:06 +02:00
2016-08-20 18:09:27 +02:00
2015-09-05 19:37:21 +02:00
2017-04-08 09:53:32 +02:00
2015-09-05 19:37:16 +02:00
2015-09-05 19:37:16 +02:00
2015-09-05 13:19:06 +02:00
2015-07-15 10:15:10 +08:00
2015-06-25 01:13:40 +02:00
2015-07-23 17:07:35 +01:00
2015-09-05 13:19:10 +02:00
2015-11-08 14:12:27 +01:00
2017-03-12 06:37:30 +01:00
2015-06-25 01:13:42 +02:00
2015-09-05 13:19:07 +02:00
2017-04-21 09:30:07 +02:00
2015-04-17 09:04:02 -04:00
2015-09-05 13:19:10 +02:00
2015-06-25 01:13:38 +02:00
2016-05-04 14:48:51 -07:00
2015-09-05 19:37:22 +02:00
2015-04-17 09:03:59 -04:00
2015-09-05 19:37:19 +02:00
2015-06-25 01:13:42 +02:00