Patch "rtc: mc146818-lib: Adjust failure return code for mc146818_get_time()" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rtc: mc146818-lib: Adjust failure return code for mc146818_get_time()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rtc-mc146818-lib-adjust-failure-return-code-for-mc146818_get_time.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From af838635a3eb9b1bc0d98599c101ebca98f31311 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario.limonciello@xxxxxxx>
Date: Mon, 27 Nov 2023 23:36:50 -0600
Subject: rtc: mc146818-lib: Adjust failure return code for mc146818_get_time()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Mario Limonciello <mario.limonciello@xxxxxxx>

commit af838635a3eb9b1bc0d98599c101ebca98f31311 upstream.

mc146818_get_time() calls mc146818_avoid_UIP() to avoid fetching the
time while RTC update is in progress (UIP). When this fails, the return
code is -EIO, but actually there was no IO failure.

The reason for the return from mc146818_avoid_UIP() is that the UIP
wasn't cleared in the time period. Adjust the return code to -ETIMEDOUT
to match the behavior.

Tested-by: Mateusz Jończyk <mat.jonczyk@xxxxx>
Reviewed-by: Mateusz Jończyk <mat.jonczyk@xxxxx>
Acked-by: Mateusz Jończyk <mat.jonczyk@xxxxx>
Cc:  <stable@xxxxxxxxxxxxxxx>
Fixes: 2a61b0ac5493 ("rtc: mc146818-lib: refactor mc146818_get_time")
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
Link: https://lore.kernel.org/r/20231128053653.101798-2-mario.limonciello@xxxxxxx
Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/rtc/rtc-mc146818-lib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/rtc/rtc-mc146818-lib.c
+++ b/drivers/rtc/rtc-mc146818-lib.c
@@ -138,7 +138,7 @@ int mc146818_get_time(struct rtc_time *t
 
 	if (!mc146818_avoid_UIP(mc146818_get_time_callback, &p)) {
 		memset(time, 0, sizeof(*time));
-		return -EIO;
+		return -ETIMEDOUT;
 	}
 
 	if (!(p.ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)


Patches currently in stable-queue which might be from mario.limonciello@xxxxxxx are

queue-6.6/rtc-extend-timeout-for-waiting-for-uip-to-clear-to-1s.patch
queue-6.6/rtc-mc146818-lib-adjust-failure-return-code-for-mc146818_get_time.patch
queue-6.6/rtc-add-support-for-configuring-the-uip-timeout-for-rtc-reads.patch
queue-6.6/rtc-cmos-use-acpi-alarm-for-non-intel-x86-systems-too.patch
queue-6.6/rtc-adjust-failure-return-code-for-cmos_set_alarm.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux