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>] [day] [month] [year] [list]
Message-Id: <200701052055.32987.david-b@pacbell.net>
Date:	Fri, 5 Jan 2007 20:55:32 -0800
From:	David Brownell <david-b@...bell.net>
To:	Alessandro Zummo <alessandro.zummo@...ertech.it>, rpurdie@...ys.net
Cc:	rtc-linux@...glegroups.com,
	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: [patch 2.6.20-rc3] rtc-sa1100 correctly reports rtc_wkalrm.enabled

This fixes one bug in the SA-1100/PXA RTC support:  read_alarm()
isn't reporting whether the alarm is enabled.  This causes a small
regression, with procfs no longer reporting that state.

Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>

---
Note there are still bugs with how this driver handles this "enabled"
flag when it _sets_ alarms.  I'm told the hh.org tree already merged
this particular patch.

Index: at91/drivers/rtc/rtc-sa1100.c
===================================================================
--- at91.orig/drivers/rtc/rtc-sa1100.c	2006-12-18 23:32:22.000000000 -0800
+++ at91/drivers/rtc/rtc-sa1100.c	2006-12-19 00:09:46.000000000 -0800
@@ -263,8 +263,12 @@ static int sa1100_rtc_set_time(struct de
 
 static int sa1100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 {
+	u32 rtsr;
+
 	memcpy(&alrm->time, &rtc_alarm, sizeof(struct rtc_time));
-	alrm->pending = RTSR & RTSR_AL ? 1 : 0;
+	rtsr = RTSR;
+	alrm->enabled = (rtsr & RTSR_ALE) ? 1 : 0;
+	alrm->pending = (rtsr & RTSR_AL) ? 1 : 0;
 	return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ