From 087c24869e9b3dde7c37de4c9462fda3928af0dc Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sun, 22 Feb 2009 13:38:40 +0100 Subject: [PATCH] --- yaml --- r: 135753 b: refs/heads/master c: 10dd31a7a17254d6ba793305fc590455393e610e h: refs/heads/master i: 135751: 1793d983aa2370380595a6faae8224b2f05c57c2 v: v3 --- [refs] | 2 +- trunk/kernel/time/ntp.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9bb501eab487..d9b28998cf3c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c7986acba211e8285e14c9603fb89e6f4ea0b9f8 +refs/heads/master: 10dd31a7a17254d6ba793305fc590455393e610e diff --git a/trunk/kernel/time/ntp.c b/trunk/kernel/time/ntp.c index 580a35028693..fc08eb10ced4 100644 --- a/trunk/kernel/time/ntp.c +++ b/trunk/kernel/time/ntp.c @@ -142,7 +142,7 @@ static void ntp_update_offset(long offset) * and in which mode (PLL or FLL). */ secs = xtime.tv_sec - time_reftime; - if (unlikely(time_status & STA_FREQHOLD || time_reftime == 0)) + if (unlikely(time_status & STA_FREQHOLD)) secs = 0; time_reftime = xtime.tv_sec; @@ -394,6 +394,13 @@ int do_adjtimex(struct timex *txc) } /* only set allowed bits */ time_status &= STA_RONLY; + /* + * If we turn on PLL adjustments then reset the + * reference time to current time. + */ + if (!(time_status & STA_PLL) && (txc->status & STA_PLL)) + time_reftime = xtime.tv_sec; + time_status |= txc->status & ~STA_RONLY; switch (time_state) {