Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1982454rdb; Mon, 9 Oct 2023 08:52:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/bMaBaJFl4Qid9quTiz3b/3ENfyO68UXngzu6thqUuyBmOfXzATTKwK4FablLfRUKHjGf X-Received: by 2002:a17:90b:3a84:b0:274:4fb:360a with SMTP id om4-20020a17090b3a8400b0027404fb360amr13849685pjb.16.1696866762733; Mon, 09 Oct 2023 08:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696866762; cv=none; d=google.com; s=arc-20160816; b=ELA3zujDvpyzicqr03iw5cW6i+9OWNB90DNk+6D6uxb9ud2M8bwwPzYKUOlhiJhkFN YPTzKH1m7r9copXPt7d/9UxBNw7/vSY15XB8tgUHPT9Ful4DDlFWklnAtIlSM05MWcMq g5dB73ngGo8fig1qVFq1SgF7FosnCGo+HLINIKh0fQrc+UcPPzxmhhw6frc5la0Ukb/G 2+02wZ46SNCy3hGy4DArJ5kyuWyF6PYf/IkNpctVuKxDgrqU7GCDF3jfamN6oRjed68q Adt6wumXVMx09tFU2U/VkuY//M5MJ/VUTsTyFrn/WYwfVJuhEM5K811VCCj+lMBLaY4s 5Upg== 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=d10ol8bgQXRCQ3CN2K11usb0w6nOmBYdHJPNNd1RZzA=; fh=G6KN1zqmJBGIhpPSq1AWsD4aWgSLDy1jBh7tZkBaukM=; b=Sd0MUxooL1ZJvcupJCuKR2pvsI+gHYdCP9anKSHxsGq6QkdPXekbzZM2ocBbtM/77o oxlAgVYU1tzx0i5e8mEvEhoUeNot/xDf0Mlyx/3svF46XQQSIU0QQx+Kxdid9Jd9xd0/ LFUOsr0TDnccZ7IXR8/AOlP9kV9Whn8uMJAtz9NgucbFg1KCdOP7oQPa/U+qiWi7iO6g QE/vMaKv8iAOtCpm0M3bUDob9+ZMvt7fXqjtLMR/Y2wbrU+rnOmBhd9GdoKHKiNRSGmq jWgf6lpyjIuTajeWnmeR30Trw2iSrlauSmz3nQeURoQuA/H8wEIqr2ZQ5mbwyqbIfEIe Y2dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EBVAcZGQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id em20-20020a17090b015400b00276b35bc424si9373268pjb.26.2023.10.09.08.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 08:52:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EBVAcZGQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 7B3E9801C1D8; Mon, 9 Oct 2023 08:52:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377672AbjJIPv7 (ORCPT + 99 others); Mon, 9 Oct 2023 11:51:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377083AbjJIPvy (ORCPT ); Mon, 9 Oct 2023 11:51:54 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD9989F; Mon, 9 Oct 2023 08:51:52 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7EDE01C0013; Mon, 9 Oct 2023 15:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696866711; 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=d10ol8bgQXRCQ3CN2K11usb0w6nOmBYdHJPNNd1RZzA=; b=EBVAcZGQOgfR3e24L5o1/MyUk//goW/HWM+hPvBZNWpBxJrgTtvw8dqQf54U1i4BPYp4BA t9ciHAM6nos42a6p9r29lyAz1GqSzzLenWVcLPQRxqQDpTwzaO94vaz6BA82IFYjDUztzc sbyvOKm/7aRL+DbRCIu9dOaNMcy9Y9GZkZDDJN0xEMJh4OR/oSTLonFHf/Kr3pTotx6AvZ Mv4C6jiLy3zJM6tyCknjOEgCykzkmgO8hUto1tyYh/BR1gB2Q3AKYo3xkBjXSItyf61CWw gbjRPYf+drzJRNIlH6QUX7KcJC0Md1AVSB95rTbePn+rENLQUl1J00c1b8jvbA== 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 02/16] net: phy: Remove the call to phy_mii_ioctl in phy_hwstamp_get/set Date: Mon, 9 Oct 2023 17:51:24 +0200 Message-Id: <20231009155138.86458-3-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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 09 Oct 2023 08:52:39 -0700 (PDT) X-Spam-Level: ** From: Kory Maincent __phy_hwtstamp_set function were calling the phy_mii_ioctl function which will then use the ifreq pointer to call the hwtstamp callback. Now that ifreq has been removed from the hwstamp callback parameters it seems more logical to not go through the phy_mii_ioctl function and pass directly kernel_hwtstamp_config parameter to the hwtstamp callback. Lets do the same for __phy_hwtstamp_get function and return directly EOPNOTSUPP as SIOCGHWTSTAMP is not supported for now for the PHYs. Signed-off-by: Kory Maincent --- drivers/net/phy/phy.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index d058316666ba..3376e58e2b88 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -486,7 +486,7 @@ int __phy_hwtstamp_get(struct phy_device *phydev, if (!phydev) return -ENODEV; - return phy_mii_ioctl(phydev, config->ifr, SIOCGHWTSTAMP); + return -EOPNOTSUPP; } /** @@ -503,7 +503,10 @@ int __phy_hwtstamp_set(struct phy_device *phydev, if (!phydev) return -ENODEV; - return phy_mii_ioctl(phydev, config->ifr, SIOCSHWTSTAMP); + if (phydev->mii_ts && phydev->mii_ts->hwtstamp) + return phydev->mii_ts->hwtstamp(phydev->mii_ts, config, extack); + + return -EOPNOTSUPP; } /** -- 2.25.1