[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251119154852.16e3a2f4@kmaincent-XPS-13-7390>
Date: Wed, 19 Nov 2025 15:48:52 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, Florian Fainelli
<florian.fainelli@...adcom.com>, 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>, Andrei Botila
<andrei.botila@....nxp.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>,
bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 7/9] phy: mscc: add HW timestamp
configuration reporting
On Wed, 19 Nov 2025 12:47:23 +0000
Vadim Fedorenko <vadim.fedorenko@...ux.dev> wrote:
> The driver stores HW configuration and can technically report it.
> Add callback to do it.
The hwtstamp_set ops of this driver is well written!
Setting vsc8531->ptp->tx_type and vsc8531->ptp->rx_filter after the switch
condition.
Reviewed-by: Kory Maincent <kory.maincent@...tlin.com>
Thank you!
>
> Signed-off-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
> ---
> drivers/net/phy/mscc/mscc_ptp.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c
> index dc06614222f6..4865eac74b0e 100644
> --- a/drivers/net/phy/mscc/mscc_ptp.c
> +++ b/drivers/net/phy/mscc/mscc_ptp.c
> @@ -1051,6 +1051,18 @@ static void vsc85xx_ts_reset_fifo(struct phy_device
> *phydev) val);
> }
>
> +static int vsc85xx_hwtstamp_get(struct mii_timestamper *mii_ts,
> + struct kernel_hwtstamp_config *cfg)
> +{
> + struct vsc8531_private *vsc8531 =
> + container_of(mii_ts, struct vsc8531_private, mii_ts);
> +
> + cfg->tx_type = vsc8531->ptp->tx_type;
> + cfg->rx_filter = vsc8531->ptp->rx_filter;
> +
> + return 0;
> +}
> +
> static int vsc85xx_hwtstamp_set(struct mii_timestamper *mii_ts,
> struct kernel_hwtstamp_config *cfg,
> struct netlink_ext_ack *extack)
> @@ -1612,6 +1624,7 @@ int vsc8584_ptp_probe(struct phy_device *phydev)
> vsc8531->mii_ts.rxtstamp = vsc85xx_rxtstamp;
> vsc8531->mii_ts.txtstamp = vsc85xx_txtstamp;
> vsc8531->mii_ts.hwtstamp_set = vsc85xx_hwtstamp_set;
> + vsc8531->mii_ts.hwtstamp_get = vsc85xx_hwtstamp_get;
> vsc8531->mii_ts.ts_info = vsc85xx_ts_info;
> phydev->mii_ts = &vsc8531->mii_ts;
>
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists