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]
Message-Id: <20141014.125239.1562178476120218308.davem@davemloft.net>
Date:	Tue, 14 Oct 2014 12:52:39 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	richardcochran@...il.com
Cc:	b38611@...escale.com, netdev@...r.kernel.org,
	bhutchings@...arflare.com, b20596@...escale.com
Subject: Re: [PATCH] net: fec: ptp: fix convergence issue to support
 LinuxPTP stack

From: Richard Cochran <richardcochran@...il.com>
Date: Tue, 14 Oct 2014 12:36:10 +0200

> On Tue, Oct 14, 2014 at 01:39:47PM +0800, Fugang Duan wrote:
>> IEEE 1588 module has one hw issue in capturing the ATVR register. According
>> to the user manual it is:
>> 		ENET0->ATCR |= ENET_ATCR_CAPTURE_MASK;
>> 		while(ENET0->ATCR & ENET_ATCR_CAPTURE_MASK);
>> 		ts_counter_ns = ENET0->ATVR;
> 
> ...
> 
>> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
>> index cca3617..380bb10 100644
>> --- a/drivers/net/ethernet/freescale/fec_ptp.c
>> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
>> @@ -82,12 +82,17 @@ static cycle_t fec_ptp_read(const struct cyclecounter *cc)
>>  {
>>  	struct fec_enet_private *fep =
>>  		container_of(cc, struct fec_enet_private, cc);
>> +	const struct platform_device_id *id_entry =
>> +		platform_get_device_id(fep->pdev);
>>  	u32 tempval;
>>  
>>  	tempval = readl(fep->hwp + FEC_ATIME_CTRL);
>>  	tempval |= FEC_T_CTRL_CAPTURE;
>>  	writel(tempval, fep->hwp + FEC_ATIME_CTRL);
>>  
>> +	if (id_entry->driver_data & FEC_QUIRK_BUG_CAPTURE)
>> +		udelay(1);
>> +
> 
> What? You never had
> 
> 	while(ENET0->ATCR & ENET_ATCR_CAPTURE_MASK);
> 
> in the first place. Maybe you should try that.
> 
> Did this code ever work? I guess not.

Also see Luwei Zhou's series:

http://patchwork.ozlabs.org/patch/398467/
http://patchwork.ozlabs.org/patch/398465/
http://patchwork.ozlabs.org/patch/398466/

Let's get down to the bottom of all of this before I apply anything.  Does this
fec PTP code work at all?
--
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