Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2489473pxj; Mon, 17 May 2021 02:49:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaMrqs1HR+DfX5pWzygc8WUkeIpr4T2jKyn8LTREORT3lVs8Fk/kM942QbS9zurF5RvSWM X-Received: by 2002:a92:b746:: with SMTP id c6mr19943137ilm.240.1621244966909; Mon, 17 May 2021 02:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621244966; cv=none; d=google.com; s=arc-20160816; b=CO2Vkyyqxp8PMCqY0aBeMSUng0Y6vAIc7LmUrcM69MGLrGRJRU3mn22I0FOYq5gGU7 ZF6JFZMuYhjXL3lU1QJddLbfzVBpiTu9KIZsR10g7gJGnOzadeBFs9AFZLfwBwmTRygt KdxF2M+MSg7s3V07YQHmIiYPX66VAmc+U1Tb7GYDHXZ+pybfufxxF3EcIywQcsu+wsOZ K/2kVo6XVyPBd/X1vF3ZYFoGHlH3Of1r7M2DsXSujgvU1zXVyN6ZX1CE+N59TSkqcF3O wip8AUHVL0avxRahVwDMUO4efyCaXJYz+Fl9+8S31EwLGymfHHUETiaGiRwU2iiwF0+w GAyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from:ironport-sdr :ironport-sdr; bh=XWmTgCz+teWt7iD0PXUNsoGBad/ve9Y5UNQCKtUU4uA=; b=o/45FMPPdDe027GB++V+bCYsLABisd4vFMLYW+i0V+LI6Fw++FRxedSFqUrnqcnXJ9 p3KxKfz9+HlMrwIf7AdYgvMh0Wnc1CK775qEz3Lf/RoB8deZiiNXPswo7QQSQt6ge7CV i1lkCLRcS/leSKfMQ0Nvx9qnCKpxnNHnctJBCVBBIwMPgrut+xY+wPjtaWoxkqegkBBZ ScFajQnnEup8pJJZ/nLcxs7BNsYy+sjMR0M6gklCMu38eQOHtw6U8kkjRu4d6mwfbMWo HLcPqjymwoeNlYHZD6+zNHIar9aYbpi/0j59nmx9GZgIpqujGxJ+MCrjOfpkEzDs12Fd l0xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s6si17387035jao.56.2021.05.17.02.49.13; Mon, 17 May 2021 02:49:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236080AbhEQJtv (ORCPT + 99 others); Mon, 17 May 2021 05:49:51 -0400 Received: from mga05.intel.com ([192.55.52.43]:33296 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236032AbhEQJtu (ORCPT ); Mon, 17 May 2021 05:49:50 -0400 IronPort-SDR: HXHRLbWzGJuVEVzlt4HsG6QirUBiQI9uF7kvbnqqEZPh4hiG4N7asbXJ3vd+0jdwo3TVd0vxKM 6bloxCvw8/vg== X-IronPort-AV: E=McAfee;i="6200,9189,9986"; a="285958469" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="285958469" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 02:48:33 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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