[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA_GA1fW2zA2j66y7zfVe6+U-pb1=3mOyFFH+oDHimMFAXyH7Q@mail.gmail.com>
Date: Wed, 31 Oct 2012 14:29:23 +0800
From: Bob Liu <lliubbo@...il.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: netdev@...r.kernel.org, Miroslav Lichvar <mlichvar@...hat.com>,
John Ronciak <john.ronciak@...el.com>,
John Stultz <john.stultz@...aro.org>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
device-drivers-devel@...ckfin.uclinux.org,
Jacob Keller <jacob.e.keller@...el.com>,
uclinux-dist-devel@...ckfin.uclinux.org,
Patrick Ohly <patrick.ohly@...el.com>,
David Miller <davem@...emloft.net>
Subject: Re: [uclinux-dist-devel] [PATCH RFC net-next 2/4] bfin_mac: replace
sys time stamps with raw ones instead.
On Tue, Oct 30, 2012 at 9:41 PM, Richard Cochran
<richardcochran@...il.com> wrote:
> On Tue, Oct 30, 2012 at 05:17:51PM +0800, Bob Liu wrote:
>
>> > @@ -892,51 +879,25 @@ static void bfin_rx_hwtstamp(struct net_device *netdev, struct sk_buff *skb)
>> >
>> > regval = bfin_read_EMAC_PTP_RXSNAPLO();
>> > regval |= (u64)bfin_read_EMAC_PTP_RXSNAPHI() << 32;
>> > - ns = timecounter_cyc2time(&lp->clock, regval);
>> > - timecompare_update(&lp->compare, ns);
>> > + ns = regval >> lp->shift;
>> > memset(shhwtstamps, 0, sizeof(*shhwtstamps));
>> > shhwtstamps->hwtstamp = ns_to_ktime(ns);
>> > - shhwtstamps->syststamp = timecompare_transform(&lp->compare, ns);
>> > -
>> > - bfin_dump_hwtamp("RX", &shhwtstamps->hwtstamp, &shhwtstamps->syststamp, &lp->compare);
>> > -}
>>
>> In my test, system time in slave side can't be updated although here
>> have set shhwtstamps->hwtstamp = ns_to_ktime(ns).
>> Any idea?
>
> So the "system time" in shhwtstamps->syststamp has been removed. Only
> the raw value remains.
>
> Or what do you mean by "can't be updated"?
>
> How did you test this?
>
Using ptpv2 from ptpd.sourceforge.net.
That's the tool we used to test ptp, it's out of date now?
> I would suggest the following:
>
> 1. test using Documentation/ptp/testptp to make sure the clock is
> working reasconably.
>
Seems work fine:
---------------------
root:/> ./testptp -c
capabilities:
279999999 maximum frequency adjustment (ppb)
0 programmable alarms
0 external time stamp channels
0 programmable periodic signals
0 pulse per second
root:/> ./testptp -g
clock time: 221.372644272 or Thu Jan 1 00:03:41 1970
root:/> date
Fri Jan 2 10:52:06 UTC 1970
root:/>
root:/> date -s 2010.03.16-15:30
Tue Mar 16 15:30:00 UTC 2010
root:/>
root:/> ./testptp -g
clock time: 242.392199760 or Thu Jan 1 00:04:02 1970
root:/> ./testptp -s
set time okay
root:/> ./testptp -g
clock time: 1268753411.506626656 or Tue Mar 16 15:30:11 2010
root:/>
> 2. try ptp4l from http://linuxptp.sourceforge.net/ to make sure the
> time stamping is working
>
Any guide how to use ptp4l to sync system time between two machines
over ethernet?
We used to use PTPd - Precision Time Protocol daemon.
Thanks,
--Bob
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists