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: <20251128104159.0756d624@kmaincent-XPS-13-7390>
Date: Fri, 28 Nov 2025 10:41:59 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, Russell King
 <linux@...linux.org.uk>, Heiner Kallweit <hkallweit1@...il.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>, Andrew Lunn <andrew@...n.ch>, Simon
 Horman <horms@...nel.org>, Vladimir Oltean <vladimir.oltean@....com>, Jacob
 Keller <jacob.e.keller@...el.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/4] net: phy: micrel: improve HW timestamping
 config logic

On Thu, 27 Nov 2025 21:12:42 +0000
Vadim Fedorenko <vadim.fedorenko@...ux.dev> wrote:

> The driver was adjusting stored values independently of what was
> actually supported and configured. Improve logic to store values
> once all checks are passing
> 
> Signed-off-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
> ---
>  drivers/net/phy/micrel.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 05de68b9f719..2c9a17d4ff18 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -3157,9 +3157,6 @@ static int lan8814_hwtstamp_set(struct mii_timestamper
> *mii_ts, int txcfg = 0, rxcfg = 0;
>  	int pkt_ts_enable;
>  
> -	ptp_priv->hwts_tx_type = config->tx_type;
> -	ptp_priv->rx_filter = config->rx_filter;
> -
>  	switch (config->rx_filter) {
>  	case HWTSTAMP_FILTER_NONE:
>  		ptp_priv->layer = 0;
> @@ -3187,6 +3184,9 @@ static int lan8814_hwtstamp_set(struct mii_timestamper
> *mii_ts, return -ERANGE;
>  	}
>  
> +	ptp_priv->hwts_tx_type = config->tx_type;
> +	ptp_priv->rx_filter = config->rx_filter;
> +
>  	if (ptp_priv->layer & PTP_CLASS_L2) {
>  		rxcfg = PTP_RX_PARSE_CONFIG_LAYER2_EN_;
>  		txcfg = PTP_TX_PARSE_CONFIG_LAYER2_EN_;

There is still an issue with tx_type.
HWTSTAMP_TX_ONESTEP_P2P is not supported but the driver does not return -ERANGE
if we try to set it. Could you add also this check?

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ