lkml.org 
[lkml]   [2008]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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



    \
     
     \ /
      Last update: 2008-06-25 11:01    [W:7.736 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site