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, 20 Jun 2024 11:55:42 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>, Alexandre Torgue
 <alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>, "David
 S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
 Kicinski <kuba@...nel.org>,  Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc: stable@...r.kernel.org, kernel@...gutronix.de,
 linux-kernel@...r.kernel.org,  netdev@...r.kernel.org, Richard Cochran
 <richardcochran@...il.com>, Tan Tee Min <tee.min.tan@...el.com>, Wong Vee
 Khee <vee.khee.wong@...ux.intel.com>
Subject: Re: [PATCH net v1 1/1] net: stmmac: Assign configured channel value
 to EXTTS event

On Tue, 2024-06-18 at 09:38 +0200, Oleksij Rempel wrote:
> @@ -243,12 +244,15 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
>  	num_snapshot = (ts_status & GMAC_TIMESTAMP_ATSNS_MASK) >>
>  		       GMAC_TIMESTAMP_ATSNS_SHIFT;
>  
> +	acr_value = readl(priv->ptpaddr + PTP_ACR);
> +	channel = ilog2(FIELD_GET(PTP_ACR_MASK, acr_value));

Side note for a possible net-next follow-up: as the driver already has
an equal snippet in stmmac_enable(), you con consider factor it out in
a common, more readable helper.

Cheers,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ