Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1982488rdb; Mon, 9 Oct 2023 08:52:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxn6xzlync6CIycFZMVhBHLC9b2v8XPTkIF0LcULVMFXnPh5mDEPLWzd2RldDJHRjTRFXa X-Received: by 2002:a17:90a:ff16:b0:273:fa72:ba83 with SMTP id ce22-20020a17090aff1600b00273fa72ba83mr12855156pjb.47.1696866766824; Mon, 09 Oct 2023 08:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696866766; cv=none; d=google.com; s=arc-20160816; b=y9CptErz9jkbIzcC0/i6m17TrV58teB63UTsjTvbSasPPWdvRypnQdF8HPKozoSoeP PlU8zDwl7pOvY2LmSpWhDQOUvPnvqsIHsbFKZLVGoXviKdJRr6/sFaV8xFdSoCceJEoz FZ6p3Wv4+0otb+P6YzTfQqQNXDwtoQ1T55LD/dqlR3SvoUcAi3hZJbPQF57qxvhpc2ex P8yACMxrWEZGenZDG141S3BkBWEzWo8V5y2jIr5+UpbcmKLAGrag20zXkCh8itOivkU/ bfxUwKkTogxcRaacmhAs5871ob64SQByrmdNOFUTWo2eraDHzCVTVhcTt17CFZgUB72Y iQJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S5xrHQYkyyICqKVCkMIBEoNYkfvTukzEtmdi6V8WJdA=; fh=G6KN1zqmJBGIhpPSq1AWsD4aWgSLDy1jBh7tZkBaukM=; b=rvIPWHJl5PkbaHHnSr2gU92uTIoas8cJISa316uDKBfaRESK6aZ/yaplgc0xNXVinb 6oLWqxJOJiMwRdjf/euLjP/4xzoCKU2yAv8uSY2bwPDFZ9n4xwkMRv/0qz+UY84zENY4 BOSm9ylkmJDK95u89PlJvUyzTOalbjJpfJtIOhWAVipiBlPcFshGFdYK3liYyzU8wI5T WJfRMmPyoP34LGkpt3LWZtute5w3/9QWfHv+gw+LjvFNK+dgKu/Wmm02pj8oIBBd4R73 Sx6ws/FAigc+5LnKlfaxH5lZXfGmbgvccTPMqw8JnCFBnfq6ENQA4Ghxct4++mVgLj4C rtUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p6UHPmrU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id jb14-20020a17090b408e00b0026f51be8d51si9625318pjb.82.2023.10.09.08.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 08:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p6UHPmrU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CDA5C8043C34; Mon, 9 Oct 2023 08:52:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377780AbjJIPwc (ORCPT + 99 others); Mon, 9 Oct 2023 11:52:32 -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: 8bit X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 08:52:44 -0700 (PDT) X-Spam-Level: ** 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 *mii_ts, info->phc_index = ptp_priv->ptp_clock ? ptp_clock_index(ptp_priv->ptp_clock) : -1; - if (info->phc_index == -1) { - info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE | - SOF_TIMESTAMPING_RX_SOFTWARE | - SOF_TIMESTAMPING_SOFTWARE; + if (info->phc_index == -1) return 0; - } info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE | SOF_TIMESTAMPING_RX_HARDWARE | -- 2.25.1