From patchwork Fri Jul 15 12:24:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wong Vee Khee X-Patchwork-Id: 12919137 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14BE5C43334 for ; Fri, 15 Jul 2022 12:17:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rhPFELHpJTvxrw1BKHt0Qnc+IuyE/MthmdybCOFJf+o=; b=lS/OcPOFrDNC1b jajbS4XTu14yGJcjhlpy5qBSFjKweiNUtFywq/BLaa1lWMNByGxHK38FL7wUZDnvKBSicPGGTHC+P wJFCptWiLg8fAQbh5tZQZVxI6DgyErqj8XdLFlrJUPi/z2GEzaXWwYIdPormJLvYBCoLdlu+KPvNW gxaYlBFhDz5gapqwrTEWC9+MoVPa2Hxl6JLriH/qOioOqV0BrYIUUng8yz+5OQQzvnxHjXgVBxZla JtUVL2nppix9MVDyxqMzET1s6shzoedESBJXmU7+e6Ce36FNdf+1+8pTkLfRFzEXyPEF6RW0jD9Pz kpXWyPb0tVnVaAdKrZLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCKFV-006rJu-3Q; Fri, 15 Jul 2022 12:16:49 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCKFS-006rI9-AS for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 12:16:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657887406; x=1689423406; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=7orHDdnehrqRlxB1JS1kp4d9GAAR3NEIVdEeTd0qlyU=; b=fhe2w9/WaOkpV325o5U04pq1ekJVprEDXJMGHwhBzYXzJag6uag8rCwL ukxkaZDt27hDCD5pw1pa6yBhIUTF+BffwXdJZQeV/IQklIDcFfkNZAOdN t4HJi9SI7CEDeETzu56GxCCionFn3W/KC2YO2Y3Yw8v2iyK8LWylWs4R1 YsWzs4B4mmVkcV/rUXAZQjKC6o8+A43ZRr2WdpvSc2kNIQwyuSV7DBWHn iagIqNAoWgnQKq4FXi3s6S1OOkOdxyo4Y0fg9HRFTA9ePJEadWok4EzbC DhSTakhmEdA1ho6KkhtD4PBl7fOR1mkFRhRGx6kCQj8NX/xpStizjqELZ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="372096245" X-IronPort-AV: E=Sophos;i="5.92,273,1650956400"; d="scan'208";a="372096245" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2022 05:16:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,273,1650956400"; d="scan'208";a="723065193" Received: from linux.intel.com ([10.54.29.200]) by orsmga004.jf.intel.com with ESMTP; 15 Jul 2022 05:16:40 -0700 Received: from P12HL01TMIN.png.intel.com (P12HL01TMIN.png.intel.com [10.158.65.216]) by linux.intel.com (Postfix) with ESMTP id DAE87580970; Fri, 15 Jul 2022 05:16:37 -0700 (PDT) From: Wong Vee Khee To: "David S . Miller" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Jakub Kicinski , Maxime Coquelin , Eric Dumazet , Paolo Abeni Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Wong Vee Khee Subject: [PATCH net 1/1] net: stmmac: remove redunctant disable xPCS EEE call Date: Fri, 15 Jul 2022 20:24:02 +0800 Message-Id: <20220715122402.1017470-1-vee.khee.wong@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_051646_389139_F22495E8 X-CRM114-Status: UNSURE ( 7.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Disable is done in stmmac_init_eee() on the event of MAC link down. Since setting enable/disable EEE via ethtool will eventually trigger a MAC down, removing this redunctant call in stmmac_ethtool.c to avoid calling xpcs_config_eee() twice. Fixes: d4aeaed80b0e ("net: stmmac: trigger PCS to turn off on link down") Signed-off-by: Wong Vee Khee --- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index abfb3cd5958d..9c3055ee2608 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -803,14 +803,6 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev, netdev_warn(priv->dev, "Setting EEE tx-lpi is not supported\n"); - if (priv->hw->xpcs) { - ret = xpcs_config_eee(priv->hw->xpcs, - priv->plat->mult_fact_100ns, - edata->eee_enabled); - if (ret) - return ret; - } - if (!edata->eee_enabled) stmmac_disable_eee_mode(priv);