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: <7e6db0b336a340bd80b62475fca284fc@BLUPR03MB486.namprd03.prod.outlook.com>
Date:	Tue, 14 Oct 2014 18:27:28 +0000
From:	"Frank.Li@...escale.com" <Frank.Li@...escale.com>
To:	David Miller <davem@...emloft.net>,
	"richardcochran@...il.com" <richardcochran@...il.com>
CC:	"fugang.duan@...escale.com" <fugang.duan@...escale.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"bhutchings@...arflare.com" <bhutchings@...arflare.com>
Subject: RE: [PATCH] net: fec: ptp: fix convergence issue to support LinuxPTP
 stack



> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Tuesday, October 14, 2014 11:53 AM
> To: richardcochran@...il.com
> Cc: Duan Fugang-B38611; netdev@...r.kernel.org; bhutchings@...arflare.com; Li
> Frank-B20596
> 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?

Yes, Luwei's 3 patch tested at MX6Q, MX6DL platform.

Only i.MX6SX has the problem, which fixed by fugang's patch.

i.MX6SX's ptp have the same issue even though without luwei's patch.

So luwei's patch is independent with fugang's patch.

Luwei's patch use hardware ptp adjustment method.
Fugang's patch fix the problem existed in MX6SX platform.

So I suggest apply luwei's 3 patches firstly.

Best regards
Frank Li





--
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