lists.openwall.net   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  linux-hardening  linux-cve-announce  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 01:28:28 +0000
From:	"fugang.duan@...escale.com" <fugang.duan@...escale.com>
To:	Richard Cochran <richardcochran@...il.com>
CC:	"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH v2 1/1] net: fec: ptp: avoid register access when ipg
 clock is disabled

From: Richard Cochran <richardcochran@...il.com> Data: Thursday, August 14, 2014 5:20 AM
>To: Duan Fugang-B38611
>Cc: shawn.guo@...aro.org; davem@...emloft.net; netdev@...r.kernel.org
>Subject: Re: [PATCH v2 1/1] net: fec: ptp: avoid register access when ipg
>clock is disabled
>
>On Wed, Aug 13, 2014 at 12:55:05PM +0800, Fugang Duan wrote:
>
>> diff --git a/drivers/net/ethernet/freescale/fec_main.c
>> b/drivers/net/ethernet/freescale/fec_main.c
>> index 66fe1f6..8befa2c 100644
>> --- a/drivers/net/ethernet/freescale/fec_main.c
>> +++ b/drivers/net/ethernet/freescale/fec_main.c
>> @@ -2198,6 +2198,8 @@ fec_enet_open(struct net_device *ndev)
>>  	napi_enable(&fep->napi);
>>  	phy_start(fep->phy_dev);
>>  	netif_start_queue(ndev);
>> +	if (fep->hwts_tx_en)
>> +		schedule_delayed_work(&fep->time_keep, HZ);
>>  	return 0;
>>  }
>>
>> @@ -2206,6 +2208,9 @@ fec_enet_close(struct net_device *ndev)  {
>>  	struct fec_enet_private *fep = netdev_priv(ndev);
>>
>> +	if (fep->hwts_tx_en)
>> +		cancel_delayed_work_sync(&fep->time_keep);
>
>You make the clock logic depend on whether time stamping is enabled or not.
>Why do you do that?
>
>The clock should keep ticking, even if time stamping is disabled.
>
If the ethx close, ptp stack cannot run normally, stack stop send sync message with master,
So we also cancel the delayed work.

In addition, ethx interface close also gate ipg clock, if there have register access hw will hang.
So it is necessary to cancel the delayed work.

>Thanks,
>Richard
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ