Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89735313E34 for ; Mon, 24 Nov 2025 18:12:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764007974; cv=none; b=Ac0xXIPPKBFUxj3Ic5t3tSKagyJMYIgkQ/PIiKyozkegN/gjkSGB5TxlcChVky8gJtTDD9YJJcL/hL2Mdbsk0DjAx2EEuMrntfS2mLlABfD6WiQgHWZ5IKOZBMGZhLonUX2E1R3gSiL+cucbmUCcOEMWHMiLdM7misK3Jn19mYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764007974; c=relaxed/simple; bh=1Ca/qY2Ml8cCPq7Hvu9n+qnHsxbbM3anR3yM+OPfJsU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hW95fk3g1n51lscO2g9FjN7N4Lcwi8C1/S66l2UKlbyRiNhe6hqbyO/MUAsc0rUrYr3ojcxpTqn3TvA8TXOR5vj9CWZYUwQTspCv+49RZMusYLGAtOdqtSlckm7azUt8cb/dVOy90XHM0xptvmjphDqi1bLAQSI0BN6dZ8kZnN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=nU3Kc+3R; arc=none smtp.client-ip=95.215.58.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="nU3Kc+3R" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1764007970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nG1loUxdNCihYysCEIG0CYK3HtZUZmCA9fU4W7Hq6/Q=; b=nU3Kc+3RBAEIsfICANuJlo5kRwF4KTPTDRsi5TwfuNEIM9jwcHiRkpwOleXdFQMqc32Ooo 45xEOTfhp1apd6nJ87t7r4iTYCLJ7yZJWbql5Q6XrKqIwJYa2Q0DBxjkdHF8uitCQMuFgP uzqzV3dpvSJ7zeZ6bBTUftKkuDL657M= From: Vadim Fedorenko To: Andrew Lunn , Florian Fainelli , Russell King , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrei Botila , Richard Cochran , Andrew Lunn Cc: Simon Horman , Vladimir Oltean , Jacob Keller , Kory Maincent , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, Vadim Fedorenko Subject: [PATCH net-next v5 5/7] phy: mscc: add HW timestamp configuration reporting Date: Mon, 24 Nov 2025 18:11:49 +0000 Message-ID: <20251124181151.277256-6-vadim.fedorenko@linux.dev> In-Reply-To: <20251124181151.277256-1-vadim.fedorenko@linux.dev> References: <20251124181151.277256-1-vadim.fedorenko@linux.dev> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT The driver stores HW configuration and can technically report it. Add callback to do it. Reviewed-by: Kory Maincent Signed-off-by: Vadim Fedorenko --- 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; -- 2.47.3