Messages in this thread | | | Date | Wed, 25 Jun 2008 10:59:06 +0200 | From | Alessandro Zummo <> | Subject | Re: [rtc-linux] [patch 2.6.26-rc7] rtc_read_alarm() handles wraparound |
| |
On Sun, 22 Jun 2008 20:42:13 -0700 David Brownell <david-b@pacbell.net> wrote:
> While 0e36a9a4a788e4e92407774df76c545910810d35 made sure that active > alarms were never returned with invalid "wildcard" fields (negative), > it can still report (wrongly) that the alarm triggers in the past. > > Example, if it's now 10am, an alarm firing at 5am will be triggered > TOMORROW not today. (Which may also be next month or next year...) > > This updates that alarm handling in three ways: > > * Handle alarm rollover in the common cases of RTCs that don't > support matching on all date fields. > > * Skip the invalid-field logic when it's not needed. > > * Minor bugfix ... tm_isdst should be ignored, it's one of the > fields Linux doesn't maintain. > > A warning is emitted for some of the unhandled rollover cases, but > the possible combinations are a bit too numerous to handle every > bit of potential hardware and firmware braindamage. > > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
--
Best regards,
Alessandro Zummo, Tower Technologies - Torino, Italy
http://www.towertech.it
| |