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: <ZrORp3VU7GFd+4R8@lizhi-Precision-Tower-5810>
Date: Wed, 7 Aug 2024 11:24:23 -0400
From: Frank Li <Frank.li@....com>
To: Francesco Dolcini <francesco@...cini.it>
Cc: Wei Fang <wei.fang@....com>, Shenwei Wang <shenwei.wang@....com>,
	Clark Wang <xiaoning.wang@....com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Richard Cochran <richardcochran@...il.com>,
	Francesco Dolcini <francesco.dolcini@...adex.com>,
	imx@...ts.linux.dev, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/4] net: fec: refactor PPS channel configuration

On Wed, Aug 07, 2024 at 04:43:47PM +0200, Francesco Dolcini wrote:
> From: Francesco Dolcini <francesco.dolcini@...adex.com>
>
> Preparation patch to allow for PPS channel configuration, no functional
> change intended.
>
> Signed-off-by: Francesco Dolcini <francesco.dolcini@...adex.com>

Reviewed-by: Frank Li <Frank.Li@....com>

> ---
>  drivers/net/ethernet/freescale/fec_ptp.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
> index e32f6724f568..6f0f8bf61752 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -84,8 +84,7 @@
>  #define FEC_CC_MULT	(1 << 31)
>  #define FEC_COUNTER_PERIOD	(1 << 31)
>  #define PPS_OUPUT_RELOAD_PERIOD	NSEC_PER_SEC
> -#define FEC_CHANNLE_0		0
> -#define DEFAULT_PPS_CHANNEL	FEC_CHANNLE_0
> +#define DEFAULT_PPS_CHANNEL	0
>
>  #define FEC_PTP_MAX_NSEC_PERIOD		4000000000ULL
>  #define FEC_PTP_MAX_NSEC_COUNTER	0x80000000ULL
> @@ -530,8 +529,9 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp,
>  	unsigned long flags;
>  	int ret = 0;
>
> +	fep->pps_channel = DEFAULT_PPS_CHANNEL;
> +
>  	if (rq->type == PTP_CLK_REQ_PPS) {
> -		fep->pps_channel = DEFAULT_PPS_CHANNEL;
>  		fep->reload_period = PPS_OUPUT_RELOAD_PERIOD;
>
>  		ret = fec_ptp_enable_pps(fep, on);
> @@ -542,10 +542,9 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp,
>  		if (rq->perout.flags)
>  			return -EOPNOTSUPP;
>
> -		if (rq->perout.index != DEFAULT_PPS_CHANNEL)
> +		if (rq->perout.index != fep->pps_channel)
>  			return -EOPNOTSUPP;
>
> -		fep->pps_channel = DEFAULT_PPS_CHANNEL;
>  		period.tv_sec = rq->perout.period.sec;
>  		period.tv_nsec = rq->perout.period.nsec;
>  		period_ns = timespec64_to_ns(&period);
> --
> 2.39.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ