From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6481C433ED for ; Mon, 17 May 2021 09:51:55 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F249611B0 for ; Mon, 17 May 2021 09:51:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F249611B0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OuQK51oWA8GLtMFNMOhZVntXZeseAetVCh/9ePQlJiI=; b=VAbuPahzaBfrJTd+7zAO8LB0lh OjuOGUTuxDRIHnRCtt6Neq8lowXrdICOaCtOmaxFyhN9eKU1NkySg1cX5riRUZgHAVmA5f5gRaAHY rFuv+Mcds0pwRtIZ4DS7khq8HQ/Z/V0RVtDPQtmT7Ww+bRyn9vDIPy7NmddtiCgF+NSzllqd1ELqT rT0gfWb9HRj6Ne5GDUsGTY6mRTbNS82z5WWtI0ZqDL0sT76gy00pa1xuEJ26moxjuPqrU8B42f+lK KHhS3v+UiY6Q6WxjBn80fdLA+KwDZiFLi6uDW3gNaYZcWTQ0V9qJB9ehARXr560Dl5HTCkCIXa5jy p6tYl5iw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liZrn-00ESPQ-KD; Mon, 17 May 2021 09:48:51 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liZrh-00ESO5-Lf for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 09:48:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=XWmTgCz+teWt7iD0PXUNsoGBad/ve9Y5UNQCKtUU4uA=; b=y95kc0HfU6YAVD99esRArNIN55 ex3NKzMxAMzFfcKGYRim6TW2wgXYPgZmkkqHuj/E0AEH0uc1VG15Q3DxSUazQg0pRifi7nlV+I8Rr 6obahQVBxDOnBI1e5RPgsuN/uOLsN1NHocb/1QyGobCF7BD9fVxN3/iPohhj+ehAwJcuhkQNob3dw wjQ0AvpdPiNLPo7WUHoaErCxR2UBz/2g+zQUkt9NaloFUR4TQGKDyvaT2LE2IYCP83yTIxh1dSSmF G5HJqSQpMWvgc7Og2n4JtnOkP5lh2bJ6iapXBe9+fBwoKXqYpRTkZtC7eoCB4W2i+/DMRKhmWiM2v YYZ4vHuQ==; Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liZra-00DeF3-CZ for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 09:48:43 +0000 IronPort-SDR: W2IiJ5oHBqM0kkJsrZkf2mi4s9svNj9y2m4vKnQWElS8TGgmaEb/zuq3ViH1CxVhW4pu6aoUOr 993iUUSqhcHA== X-IronPort-AV: E=McAfee;i="6200,9189,9986"; a="187833038" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="187833038" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 02:48:34 -0700 IronPort-SDR: BtMZeH5xv+CEdiQruJx2fAA9YSh2lB5octWCZn2VKPrz0BtrG/Rzd0FlZF1u9p6gPLMT7qdW// DWvsCgc6r2Xw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="540355990" Received: from mike-ilbpg1.png.intel.com ([10.88.227.76]) by fmsmga001.fm.intel.com with ESMTP; 17 May 2021 02:48:29 -0700 From: Michael Sit Wei Hong To: Jose.Abreu@synopsys.com, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, kuba@kernel.org, netdev@vger.kernel.org, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, davem@davemloft.net, mcoquelin.stm32@gmail.com, weifeng.voon@intel.com, boon.leong.ong@intel.com, tee.min.tan@intel.com, vee.khee.wong@linux.intel.com, vee.khee.wong@intel.com, michael.wei.hong.sit@intel.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 0/2] Introducing support for DWC xpcs Energy Efficient Ethernet Date: Mon, 17 May 2021 17:43:30 +0800 Message-Id: <20210517094332.24976-1-michael.wei.hong.sit@intel.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_024838_484929_964EFC28 X-CRM114-Status: GOOD ( 10.89 ) 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: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The goal of this patch set is to enable EEE in the xpcs so that when EEE is enabled, the MAC-->xpcs-->PHY have all the EEE related configurations enabled. Patch 1 adds the functions to enable EEE in the xpcs and sets it to transparent mode. Patch 2 adds the callbacks to configure the xpcs EEE mode. The results are tested by checking the lpi counters of the tx and rx path of the interface. When EEE is enabled, the lpi counters should increament as it enters and exits lpi states. host@EHL$ ethtool --show-eee enp0s30f4 EEE Settings for enp0s30f4: EEE status: disabled Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: Not reported Link partner advertised EEE link modes: 100baseT/Full 1000baseT/Full host@EHL$ ethtool -S enp0s30f4 | grep lpi irq_tx_path_in_lpi_mode_n: 0 irq_tx_path_exit_lpi_mode_n: 0 irq_rx_path_in_lpi_mode_n: 0 irq_rx_path_exit_lpi_mode_n: 0 host@EHL$ ethtool --set-eee enp0s30f4 eee on host@EHL$ [ 110.265154] intel-eth-pci 0000:00:1e.4 enp0s30f4: Link is Down [ 112.315155] intel-eth-pci 0000:00:1e.4 enp0s30f4: Link is Up - 1Gbps/Full - flow control off [ 112.324612] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s30f4: link becomes ready host@EHL$ ethtool --show-eee enp0s30f4 EEE Settings for enp0s30f4: EEE status: enabled - active Tx LPI: 1000000 (us) Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full Link partner advertised EEE link modes: 100baseT/Full 1000baseT/Full host@EHL$ ethtool -S enp0s30f4 | grep lpi irq_tx_path_in_lpi_mode_n: 6 irq_tx_path_exit_lpi_mode_n: 5 irq_rx_path_in_lpi_mode_n: 7 irq_rx_path_exit_lpi_mode_n: 6 host@EHL$ ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.02 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.510 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.489 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.484 ms 64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=0.504 ms 64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=0.466 ms 64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=0.529 ms 64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=0.519 ms 64 bytes from 192.168.1.1: icmp_seq=9 ttl=64 time=0.518 ms 64 bytes from 192.168.1.1: icmp_seq=10 ttl=64 time=0.501 ms --- 192.168.1.1 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9216ms rtt min/avg/max/mdev = 0.466/0.553/1.018/0.155 ms host@EHL$ ethtool -S enp0s30f4 | grep lpi irq_tx_path_in_lpi_mode_n: 22 irq_tx_path_exit_lpi_mode_n: 21 irq_rx_path_in_lpi_mode_n: 21 irq_rx_path_exit_lpi_mode_n: 20 Michael Sit Wei Hong (2): net: pcs: Introducing support for DWC xpcs Energy Efficient Ethernet net: stmmac: Add callbacks for DWC xpcs Energy Efficient Ethernet .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 11 ++++ drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 + .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 +++ drivers/net/pcs/pcs-xpcs.c | 51 +++++++++++++++++++ include/linux/pcs/pcs-xpcs.h | 2 + include/linux/stmmac.h | 1 + 6 files changed, 73 insertions(+) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel