lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024111722084384333dcf@mail.local>
Date: Sun, 17 Nov 2024 23:08:43 +0100
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Frank Li <Frank.Li@....com>
Cc: Jacky Bai <ping.bai@....com>, Peng Fan <peng.fan@....com>,
	"open list:REAL TIME CLOCK (RTC) SUBSYSTEM" <linux-rtc@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>, imx@...ts.linux.dev
Subject: Re: [PATCH 1/1] rtc: bbnsm: Enable RTC by default to fix time read
 failure

On 16/11/2024 20:36:54+0100, Alexandre Belloni wrote:
> On 15/11/2024 14:48:58-0500, Frank Li wrote:
> > From: Jacky Bai <ping.bai@....com>
> > 
> > Enable the RTC by default even when no valid time is set to ensure the
> > RTC's time read and alarm functions work properly. Without this, running
> > hwclock results in the following error:
> > 
> > hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
> > 
> 
> 
> What is providing your hwclock and which version does it have?


This is a bug in util-linux that needs to be fixed.
> 
> 
> > Fixes: eb7b85853c38 ("rtc: bbnsm: Add the bbnsm rtc support")
> > Signed-off-by: Jacky Bai <ping.bai@....com>
> > Signed-off-by: Dong Aisheng <aisheng.dong@....com>
> > Signed-off-by: Frank Li <Frank.Li@....com>
> > ---
> >  drivers/rtc/rtc-nxp-bbnsm.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/rtc/rtc-nxp-bbnsm.c b/drivers/rtc/rtc-nxp-bbnsm.c
> > index fa3b0328c7a25..6610db2f75125 100644
> > --- a/drivers/rtc/rtc-nxp-bbnsm.c
> > +++ b/drivers/rtc/rtc-nxp-bbnsm.c
> > @@ -189,6 +189,9 @@ static int bbnsm_rtc_probe(struct platform_device *pdev)
> >  	/* clear all the pending events */
> >  	regmap_write(bbnsm->regmap, BBNSM_EVENTS, 0x7A);
> >  
> > +	/* Enable the Real-Time counter */
> > +	regmap_update_bits(bbnsm->regmap, BBNSM_CTRL, RTC_EN_MSK, RTC_EN);
> > +
> >  	device_init_wakeup(&pdev->dev, true);
> >  	dev_pm_set_wake_irq(&pdev->dev, bbnsm->irq);
> >  
> > -- 
> > 2.34.1
> > 
> 
> -- 
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ