lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Aug 2014 09:02:07 +0000
From:	"" <>
To:	Richard Cochran <>
CC:	"" <>,
	"" <>,
	"" <>
Subject: RE: [PATCH v2 1/1] net: fec: ptp: avoid register access when ipg
 clock is disabled

From: Richard Cochran <> Sent: Thursday, August 14, 2014 4:43 PM
>To: Duan Fugang-B38611
>Subject: Re: [PATCH v2 1/1] net: fec: ptp: avoid register access when ipg
>clock is disabled
>On Thu, Aug 14, 2014 at 08:24:39AM +0000, wrote:
>> 1. HW ptp is one feature of FEC IP, when the ethx interface is closed,
>ptp slave cannot sync with master,
>>    So the ptp timer is not accurate, of couse there have discontinuities
>in ptp clock.
>No, it just becomes a free running clock.
>This is no different than the Linux system clock. It keeps running, even
>if ntpd is not.
>> 2. When the ethx net interface is closed, FEC IP clocks are disabled,
>access ptp counter register causes
>>    Hw hang.
>Well, then, you need to return an error, don't you?

I know your means. Even if cancel the time_keep work, ptp timer still is running and continutious.
The time_keep work just to avoid timer overrun because FEC just support 32bit counter.

ns = timecounter_read(&fep->tc);

static cycle_t fec_ptp_read(const struct cyclecounter *cc)
        tempval = readl(fep->hwp + FEC_ATIME_CTRL);
        tempval |= FEC_T_CTRL_CAPTURE;
        writel(tempval, fep->hwp + FEC_ATIME_CTRL);

        return readl(fep->hwp + FEC_ATIME);

And, you said "return an error", I don't know your mean.
In addition, when clock is disabled, FEC ptp counter don't run any more.

>> 3. PTP is not separate HW IP, which is one hw feature of FEC IP, when
>the net interface is closed, user
>>    Call clock_gettime() is not reasonable.
>Yes, it is. See #1.
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists