Stewart Smith
5b8b580630
rtc-opal: Fix handling of firmware error codes, prevent busy loops
...
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: 16b1d26e77b1 ("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>
2018-01-27 21:15:59 +11:00
..
2017-11-02 11:10:55 +01:00
2017-11-30 13:37:29 +01:00
2017-11-14 16:54:12 -08:00
2017-11-16 09:10:59 -08:00
2017-11-15 14:11:41 -08:00
2017-11-29 13:10:25 -08:00
2017-11-27 12:36:45 -08:00
2017-11-21 16:35:54 -08:00
2017-11-15 11:56:19 -08:00
2017-12-01 08:05:45 -05:00
2017-11-04 09:26:51 +09:00
2017-11-16 16:05:01 -08:00
2017-11-14 15:32:19 -08:00
2017-11-26 14:11:54 -08:00
2017-11-17 20:04:24 -08:00
2017-11-23 16:29:05 +01:00
2017-11-22 00:00:14 +01:00
2018-01-18 15:43:44 +11:00
2017-11-16 12:47:46 -08:00
2017-11-29 18:40:42 -08:00
2017-11-13 01:41:39 +01:00
2017-11-02 11:10:55 +01:00
2017-11-14 16:49:31 -08:00
2017-11-17 14:58:01 -08:00
2017-11-15 13:46:33 -08:00
2017-11-02 11:10:55 +01:00
2017-11-13 21:14:07 -08:00
2017-11-13 17:56:58 -08:00
2017-11-21 15:46:44 -08:00
2017-11-02 11:10:55 +01:00
2017-11-16 09:10:59 -08:00
2017-11-16 10:57:11 -08:00
2017-12-01 09:15:57 +10:00
2017-11-21 15:57:07 -08:00
2017-11-15 13:35:43 -08:00
2017-11-16 09:10:59 -08:00
2017-11-30 13:12:44 -08:00
2017-11-17 20:16:20 -08:00
2017-11-16 09:10:59 -08:00
2017-11-27 19:14:29 +01:00
2017-11-19 08:04:41 -10:00
2017-11-13 01:34:14 +01:00
2017-11-21 15:57:07 -08:00
2017-11-29 18:40:42 -08:00
2017-11-21 16:35:54 -08:00
2017-11-21 15:57:07 -08:00
2017-11-26 14:39:20 -08:00
2017-11-21 15:57:09 -08:00
2017-11-14 18:09:31 -08:00
2017-11-21 15:46:44 -08:00
2018-01-27 21:10:22 +11:00
2017-11-15 13:39:18 -08:00
2017-11-02 11:10:55 +01:00
2017-11-24 16:23:01 -07:00
2017-11-29 18:40:42 -08:00
2017-11-16 16:05:01 -08:00
2017-11-21 15:57:07 -08:00
2017-11-15 13:46:33 -08:00
2017-11-21 15:57:07 -08:00
2018-01-24 11:43:00 +11:00
2017-12-01 08:14:22 -05:00
2017-11-27 13:05:09 -08:00
2017-11-29 13:10:25 -08:00
2017-11-21 15:57:09 -08:00
2017-11-21 15:57:07 -08:00
2017-11-13 12:10:24 -08:00
2017-11-17 09:51:57 -08:00
2017-11-28 08:49:26 -08:00
2017-11-16 09:10:59 -08:00
2017-11-20 21:38:41 -10:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-16 09:10:59 -08:00
2018-01-27 20:02:51 +11:00
2017-11-17 16:10:04 -08:00
2017-11-15 10:56:56 -08:00
2017-11-13 21:14:07 -08:00
2017-11-16 10:57:11 -08:00
2017-11-25 08:37:16 -10:00
2017-11-02 11:10:55 +01:00
2017-11-15 13:37:15 -08:00
2017-11-21 15:57:07 -08:00
2017-12-04 15:01:08 +11:00
2017-11-16 13:06:27 -08:00
2017-11-22 21:09:18 -10:00
2017-11-17 16:56:17 -08:00
2017-11-13 17:56:58 -08:00
2017-11-16 09:15:57 -08:00
2017-11-17 20:14:10 -08:00
2017-11-16 16:05:01 -08:00
2017-11-17 20:12:08 -08:00
2018-01-27 21:15:59 +11:00
2017-11-30 08:13:36 -08:00
2017-11-17 20:21:44 -08:00
2017-11-25 08:37:16 -10:00
2017-11-14 16:54:12 -08:00
2017-11-16 16:05:01 -08:00
2017-11-10 21:33:51 +00:00
2017-11-02 11:10:55 +01:00
2017-11-27 13:05:09 -08:00
2017-11-25 08:37:16 -10:00
2017-11-02 11:10:55 +01:00
2017-11-17 14:31:27 -08:00
2017-11-16 09:10:59 -08:00
2017-11-21 16:35:54 -08:00
2017-11-02 11:10:55 +01:00
2017-11-21 15:57:07 -08:00
2017-11-21 15:57:07 -08:00
2017-11-14 16:47:47 -08:00
2017-11-17 12:08:18 -08:00
2017-11-20 21:50:24 -10:00
2017-11-14 23:57:38 +02:00
2017-11-16 09:10:59 -08:00
2017-11-16 09:10:59 -08:00
2017-11-21 15:57:07 -08:00
2017-11-21 15:57:05 -08:00
2017-11-02 11:10:55 +01:00
2017-11-13 01:40:52 +01:00
2017-11-13 01:40:52 +01:00