Commit cef9ecc8 authored by Mario Limonciello's avatar Mario Limonciello Committed by Alexandre Belloni
Browse files

rtc: Extend timeout for waiting for UIP to clear to 1s



Specs don't say anything about UIP being cleared within 10ms. They
only say that UIP won't occur for another 244uS. If a long NMI occurs
while UIP is still updating it might not be possible to get valid
data in 10ms.

This has been observed in the wild that around s2idle some calls can
take up to 480ms before UIP is clear.

Adjust callers from outside an interrupt context to wait for up to a
1s instead of 10ms.

Cc:  <stable@vger.kernel.org> # 6.1.y
Fixes: ec5895c0 ("rtc: mc146818-lib: extract mc146818_avoid_UIP")
Reported-by: default avatarCarsten Hatger <xmb8dsv4@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217626


Tested-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Reviewed-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Acked-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20231128053653.101798-5-mario.limonciello@amd.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 120931db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment