From patchwork Sun May 12 16:29:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13662797 X-Patchwork-Delegate: kuba@kernel.org Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 2DB3347A73 for ; Sun, 12 May 2024 16:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715531367; cv=none; b=ZsN2IsdeF7vT9XIK8ozl0osmT/bNssPCyu3c0L6JSqwfoMJjdWmpAo3dMGql3fVNqJs2mvW3JlAylRXcp5S1MqsfKBgDUrws4aQFdE+3EX8SwfyC95fN3ZNdOVfV/kyxyaAcyCDqNQ1GziR5emmxPinLJz8Sj8QA+bywAtoqEpA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715531367; c=relaxed/simple; bh=TlWhA/4m1p7DMkw23HNFcwEbQ48MLkhf87mZgfSEjho=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=WlqNZ+o8rvds7KzyAMQ4+VWcML0PjzENO9HArcPcPuv9m/UAfCoc91eE6abGKcZuYu+3FM5BIOZdAsQ72Cy8vgWnovLYeXvZX2Lx55nOMnbnY9lrwFPdGxEEHWVQUmtYdRG6TjNEiqN+HGEHv94hhz0Pd5cP7X7FlxnxU+gpifg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=LXy/iGn6; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="LXy/iGn6" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=afPOCEWnaXq4StvbkwSPZO66D+Nn8dt1v0mNXaQzjQ8=; b=LXy/iGn6NdXkorsUdRC8yXNFY/ 7mc3aU9TmCY9TN/KO3j7KeH4x/mE9es6zz+pPocfiIl5VTXtzQu58XCdVjcCoj0uAksmLsxlLaULl +QKf4y8c480TelHoDZm21YL7kmMHQlkHqIfzAg8pWD4ACse9ImpAGchpLtv5v2QQo61x4SO3xGzfr 1WpSya09jPZcRYctDGu7bOiSQt32nwOqXumCytgHgphqe7mXAR/k8BDJnqYQpIGtTBW7pnI1lN887 YT0mN/jdu6xYm9Ynb31QBzI+y3ne2as8nbfHbbBZj2LgnRGoMXHL+onIBA84GlXa8YuoXYDBEAZr6 p5idqhdw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:44488 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s6C4W-0000tj-2E; Sun, 12 May 2024 17:29:12 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1s6C4Y-00Ck6a-Gr; Sun, 12 May 2024 17:29:14 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Serge Semin Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH RFC net-next 4/6] net: stmmac: remove calls to stmmac_pcs_get_adv_lp() Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Message-Id: Sender: Russell King Date: Sun, 12 May 2024 17:29:14 +0100 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC phylink can handle the pause parameter ethtool ops; let it do so. Signed-off-by: Russell King (Oracle) --- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 2aaffa07977e..d8beeebe8745 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -429,15 +429,8 @@ stmmac_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) { struct stmmac_priv *priv = netdev_priv(netdev); - struct rgmii_adv adv_lp; - if (priv->hw->pcs && !stmmac_pcs_get_adv_lp(priv, priv->ioaddr, &adv_lp)) { - pause->autoneg = 1; - if (!adv_lp.pause) - return; - } else { - phylink_ethtool_get_pauseparam(priv->phylink, pause); - } + phylink_ethtool_get_pauseparam(priv->phylink, pause); } static int @@ -445,16 +438,8 @@ stmmac_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) { struct stmmac_priv *priv = netdev_priv(netdev); - struct rgmii_adv adv_lp; - if (priv->hw->pcs && !stmmac_pcs_get_adv_lp(priv, priv->ioaddr, &adv_lp)) { - pause->autoneg = 1; - if (!adv_lp.pause) - return -EOPNOTSUPP; - return 0; - } else { - return phylink_ethtool_set_pauseparam(priv->phylink, pause); - } + return phylink_ethtool_set_pauseparam(priv->phylink, pause); } static u64 stmmac_get_rx_normal_irq_n(struct stmmac_priv *priv, int q)