summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-08-02 11:50:16 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 15:40:04 +0100
commitdaa21b8dbc29e671a3e8ac7d84428a431352d3ff (patch)
treee2b99c1064e4ec7817f0947cde88a344a0ddc5d5 /fs
parente5394e1050a11055735a64a05fcb70ae7a05bae1 (diff)
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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions