From: Revanth Kumar Uppala <ruppala@nvidia.com>
To: <linux@armlinux.org.uk>, <andrew@lunn.ch>, <hkallweit1@gmail.com>,
<netdev@vger.kernel.org>
Cc: <linux-tegra@vger.kernel.org>,
Revanth Kumar Uppala <ruppala@nvidia.com>,
Narayan Reddy <narayanr@nvidia.com>
Subject: [PATCH 2/4] net: phy: aquantia: Enable MAC Controlled EEE
Date: Wed, 28 Jun 2023 18:13:24 +0530 [thread overview]
Message-ID: <20230628124326.55732-2-ruppala@nvidia.com> (raw)
In-Reply-To: <20230628124326.55732-1-ruppala@nvidia.com>
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@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.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
next prev parent reply other threads:[~2023-06-28 12:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 12:43 [PATCH 1/4] net: phy: aquantia: Enable Tx/Rx pause frame support in aquantia PHY Revanth Kumar Uppala
2023-06-28 12:43 ` Revanth Kumar Uppala [this message]
2023-06-28 13:54 ` [PATCH 2/4] net: phy: aquantia: Enable MAC Controlled EEE Andrew Lunn
2023-07-24 11:29 ` Revanth Kumar Uppala
2023-07-24 11:52 ` Russell King (Oracle)
2023-06-28 12:43 ` [PATCH 3/4] net: phy: aquantia: Poll for TX ready at PHY system side Revanth Kumar Uppala
2023-06-28 13:33 ` Russell King (Oracle)
2023-07-24 11:29 ` Revanth Kumar Uppala
2023-07-24 11:57 ` Russell King (Oracle)
2024-07-19 13:27 ` Jon Hunter
2024-07-29 10:47 ` Russell King (Oracle)
2024-07-30 9:36 ` Jon Hunter
2024-07-30 9:41 ` Russell King (Oracle)
2024-07-30 10:02 ` Jon Hunter
2024-07-30 11:12 ` Russell King (Oracle)
2024-07-30 12:25 ` Jon Hunter
2024-09-24 10:33 ` Jon Hunter
2023-06-28 12:43 ` [PATCH 4/4] net: phy: aqr113c: Enable Wake-on-LAN (WOL) Revanth Kumar Uppala
2023-06-28 13:43 ` Russell King (Oracle)
2023-07-24 11:29 ` Revanth Kumar Uppala
2023-07-24 12:29 ` Russell King (Oracle)
2023-06-28 14:17 ` Andrew Lunn
2023-07-24 11:30 ` Revanth Kumar Uppala
2023-06-28 18:57 ` kernel test robot
2023-06-28 13:30 ` [PATCH 1/4] net: phy: aquantia: Enable Tx/Rx pause frame support in aquantia PHY Russell King (Oracle)
2023-06-28 13:46 ` Andrew Lunn
2023-07-24 11:29 ` Revanth Kumar Uppala
2023-07-24 11:47 ` Russell King (Oracle)
2023-06-28 13:46 ` Russell King (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230628124326.55732-2-ruppala@nvidia.com \
--to=ruppala@nvidia.com \
--cc=andrew@lunn.ch \
--cc=hkallweit1@gmail.com \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=narayanr@nvidia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.