Commit 228928e8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by sanglipeng
Browse files

rtc: mc146818: Dont test for bit 0-5 in Register D

stable inclusion
from stable-v5.10.159
commit f5b51f855036e39456ac36aadc7078ac583c5932
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7NTXH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f5b51f855036e39456ac36aadc7078ac583c5932



--------------------------------

[ Upstream commit ebb22a05 ]

The recent change to validate the RTC turned out to be overly tight.

While it cures the problem on the reporters machine it breaks machines
with Intel chipsets which use bit 0-5 of the D register. So check only
for bit 6 being 0 which is the case on these Intel machines as well.

Fixes: 211e5db1 ("rtc: mc146818: Detect and handle broken RTCs")
Reported-by: default avatarSerge Belyshev <belyshev@depni.sinp.msu.ru>
Reported-by: default avatarDirk Gouders <dirk@gouders.net>
Reported-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarDirk Gouders <dirk@gouders.net>
Tested-by: default avatarLen Brown <len.brown@intel.com>
Tested-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/87zh0nbnha.fsf@nanos.tec.linutronix.de


Stable-dep-of: cd17420e ("rtc: cmos: avoid UIP when writing alarm time")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent fcf92cde
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment