Closed Bug 892037 Opened 9 years ago Closed 9 years ago

Date/Time is not updated properly when setting the RTC fails

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tkundu, Assigned: tkundu)

Details

Attachments

(1 file, 2 obsolete files)

Gecko doesn't update Date/Time properly if ioctl fails to set hardware RTC  http://mxr.mozilla.org/mozilla-central/source/hal/gonk/GonkHal.cpp#737  .

Gecko should update system clock even if it fails to set hardware RTC for some reasons .
Assignee: nobody → tkundu
Summary: (jb-gonk) Date/Time is not updated properly → (jb-gonk) Date/Time is not updated properly when setting the RTC fails
This updates Date/Time even if hardware RTC fails to update
Attachment #773644 - Flags: review?(mwu)
Status: NEW → ASSIGNED
Is this really a gonk-jb issue? (if so, make it depend on the gonk-jb bug) Is there something else we should be using to set the time?
Not really a gonk-jb issue.  This bug is really just trying to address what happens if RTC is not available at all (so yeah we loose the time on reboot but without this patch the time won't be set at all).   More of a nice-to-have during bring-up.
Summary: (jb-gonk) Date/Time is not updated properly when setting the RTC fails → Date/Time is not updated properly when setting the RTC fails
I'm ok with updating the time if the ioctl fails, but not if /dev/alarm can't be opened. /dev/alarm also updates the system time which we need since we don't call settimeofday.
(In reply to Michael Wu [:mwu] from comment #4)
> I'm ok with updating the time if the ioctl fails, but not if /dev/alarm
> can't be opened. /dev/alarm also updates the system time which we need since
> we don't call settimeofday.

It seems to me that we are setting system time here by calling ioctl http://dxr.mozilla.org/mozilla-central/source/hal/gonk/GonkHal.cpp#l735 . 

Are we using /dev/alarm to set time somewhere else other than this function ? If not so the we can ignore /dev/alarm open failed and update system time .

Please suggest .
I don't think we touch /dev/alarm anywhere else. This should be the only place.

I don't want to ignore a missing /dev/alarm because we should at minimum be synchronized with system time. /dev/alarm syncs both hardware and system time AFAICT.
This has fixes suggested by mwu
Attachment #773644 - Attachment is obsolete: true
Attachment #773644 - Flags: review?(mwu)
Attachment #774267 - Flags: review?(mwu)
Attachment #774267 - Flags: review?(mwu) → review+
updating commit text, carrying r+ forward
Attachment #774267 - Attachment is obsolete: true
Attachment #774289 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/6143e65a9bb7
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.