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:26:45 +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 5:13 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 09:02:07AM +0000, wrote:
>> 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.
>Right, so the time_keep must continue when the clock is running. It does
>not depend on whether time stamping is enabled.

So, your mean we need to start the time_keep early like the orignal method, on the contrary,
The patch like below is not reasonable:

@@ -289,9 +289,11 @@ int fec_ptp_set(struct net_device *ndev, struct ifreq *ifr)
        switch (config.tx_type) {
        case HWTSTAMP_TX_OFF:
                fep->hwts_tx_en = 0;
+               cancel_delayed_work_sync(&fep->time_keep);
        case HWTSTAMP_TX_ON:
                fep->hwts_tx_en = 1;
+               schedule_delayed_work(&fep->time_keep, HZ);

>> 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.
>You can return an error from your 'gettime' method.
In the driver:
Period delayed work: fec_time_keep()->timecounter_read()->fec_ptp_read()

When ethx disable, all clocks are disabled. For gettime(), your mean that we check clock is on or not,
If clock is disabled, return an error in .fec_ptp_gettime() ?
How did it in the delayed work ?

Thanks for your review, I am confused by your suggestion.

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