From nobody Fri Jan 2 20:33:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F362E95A9F for ; Mon, 9 Oct 2023 15:52:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377637AbjJIPwd (ORCPT ); Mon, 9 Oct 2023 11:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377751AbjJIPwU (ORCPT ); Mon, 9 Oct 2023 11:52:20 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89DE618F; Mon, 9 Oct 2023 08:52:12 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 370801C0011; Mon, 9 Oct 2023 15:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696866731; 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=S5xrHQYkyyICqKVCkMIBEoNYkfvTukzEtmdi6V8WJdA=; b=p6UHPmrUmFDllKWCYfAAHTYuIRZG8gLNy4uqUwjLh/Qlj0D0KGE4nSOGZVCboJ6bVJKrus GE0DkZCgjhWuJJkqYhQbR9n769hO/+QEYo8ABsWBMAG93kQ4xtlaNVv26UpmGZNrHYgtHz s/RSUc6Nf9ppYfTHQI7+sO7gFscZ627BWitZwgLz+c4dT7045m8zFSZNHPRDtP9Dx24IRN 6fghTjrpQofGjT+nzY7kk8bMfK3Ggnz/aOu16bwPsz7lAb5FQ04J8WrM7E9X0W/dwabgjf cDHAbwx1sik7s2cuQvL8Pshq6aWVY6axsH8QJRql3FOf/aDN716Tuxn+XfFEkg== From: =?UTF-8?q?K=C3=B6ry=20Maincent?= To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Thomas Petazzoni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Horatiu Vultur , UNGLinuxDriver@microchip.com, Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , Richard Cochran , Radu Pirea , Willem de Bruijn , Vladimir Oltean , Michael Walle , Jacob Keller , Maxime Chevallier , Kory Maincent Subject: [PATCH net-next v5 07/16] net: phy: micrel: fix ts_info value in case of no phc Date: Mon, 9 Oct 2023 17:51:29 +0200 Message-Id: <20231009155138.86458-8-kory.maincent@bootlin.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231009155138.86458-1-kory.maincent@bootlin.com> References: <20231009155138.86458-1-kory.maincent@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Kory Maincent In case of no phc we should not return SOFTWARE TIMESTAMPING flags as we do not know the netdev supports of timestamping. Remove it from the lan8841_ts_info and simply return 0. Signed-off-by: Kory Maincent --- This patch is not tested but it seems consistent to me. --- drivers/net/phy/micrel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 43d072b53839..4c115e55ffc0 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -3607,12 +3607,8 @@ static int lan8841_ts_info(struct mii_timestamper *m= ii_ts, =20 info->phc_index =3D ptp_priv->ptp_clock ? ptp_clock_index(ptp_priv->ptp_clock) : -1; - if (info->phc_index =3D=3D -1) { - info->so_timestamping |=3D SOF_TIMESTAMPING_TX_SOFTWARE | - SOF_TIMESTAMPING_RX_SOFTWARE | - SOF_TIMESTAMPING_SOFTWARE; + if (info->phc_index =3D=3D -1) return 0; - } =20 info->so_timestamping =3D SOF_TIMESTAMPING_TX_HARDWARE | SOF_TIMESTAMPING_RX_HARDWARE | --=20 2.25.1