lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230628124326.55732-2-ruppala@nvidia.com>
Date:   Wed, 28 Jun 2023 18:13:24 +0530
From:   Revanth Kumar Uppala <ruppala@...dia.com>
To:     <linux@...linux.org.uk>, <andrew@...n.ch>, <hkallweit1@...il.com>,
        <netdev@...r.kernel.org>
CC:     <linux-tegra@...r.kernel.org>,
        Revanth Kumar Uppala <ruppala@...dia.com>,
        Narayan Reddy <narayanr@...dia.com>
Subject: [PATCH 2/4] net: phy: aquantia: Enable MAC Controlled EEE

Enable MAC controlled energy efficient ethernet (EEE) so that MAC can
keep the PHY in EEE sleep mode when link utilization is low to reduce
energy consumption.

Signed-off-by: Narayan Reddy <narayanr@...dia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@...dia.com>
---
 drivers/net/phy/aquantia_main.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c
index c99b9d066463..faca2a0b1d49 100644
--- a/drivers/net/phy/aquantia_main.c
+++ b/drivers/net/phy/aquantia_main.c
@@ -28,6 +28,9 @@
 
 #define MDIO_AN_ADVT		0x0010
 
+#define VEND1_SEC_INGRESS_CNTRL_REG1    0x7001
+#define MAC_CNTRL_EEE		(BIT(8) | BIT(12))
+
 #define MDIO_PHYXS_VEND_IF_STATUS		0xe812
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK	GENMASK(7, 3)
 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR	0
@@ -596,6 +599,12 @@ static int aqr107_config_init(struct phy_device *phydev)
 	if (ret < 0)
 		return ret;
 
+	/* Enable MAC Controlled EEE */
+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1,
+			    VEND1_SEC_INGRESS_CNTRL_REG1, MAC_CNTRL_EEE);
+	if (ret < 0)
+		return ret;
+
 	return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT);
 }
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ