From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: <andrew@lunn.ch>, <hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Horatiu Vultur <horatiu.vultur@microchip.com>
Subject: [PATCH net v4 2/2] net: phy: micrel: lan8842 errata
Date: Fri, 31 Oct 2025 13:16:29 +0100 [thread overview]
Message-ID: <20251031121629.814935-3-horatiu.vultur@microchip.com> (raw)
In-Reply-To: <20251031121629.814935-1-horatiu.vultur@microchip.com>
Add errata for lan8842. The errata document can be found here [1].
This is fixing the module 7 ("1000BASE-T PMA EEE TX wake timer is
non-compliant")
[1] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/LAN8842-Errata-DS80001172.pdf
Fixes: 5a774b64cd6a ("net: phy: micrel: Add support for lan8842")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
drivers/net/phy/micrel.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 1fa56d4c17937..6a1a424e3b30f 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -5965,6 +5965,9 @@ static int lan8842_probe(struct phy_device *phydev)
#define LAN8814_POWER_MGMT_VAL5 LAN8814_POWER_MGMT_B_C_D
+#define LAN8814_EEE_WAKE_TX_TIMER 0x0e
+#define LAN8814_EEE_WAKE_TX_TIMER_MAX_VAL 0x1f
+
static const struct lanphy_reg_data short_center_tap_errata[] = {
{ LAN8814_PAGE_POWER_REGS,
LAN8814_POWER_MGMT_MODE_3_ANEG_MDI,
@@ -6004,6 +6007,12 @@ static const struct lanphy_reg_data short_center_tap_errata[] = {
LAN8814_POWER_MGMT_VAL4 },
};
+static const struct lanphy_reg_data waketx_timer_errata[] = {
+ { LAN8814_PAGE_EEE,
+ LAN8814_EEE_WAKE_TX_TIMER,
+ LAN8814_EEE_WAKE_TX_TIMER_MAX_VAL },
+};
+
static int lanphy_write_reg_data(struct phy_device *phydev,
const struct lanphy_reg_data *data,
size_t num)
@@ -6022,8 +6031,15 @@ static int lanphy_write_reg_data(struct phy_device *phydev,
static int lan8842_erratas(struct phy_device *phydev)
{
- return lanphy_write_reg_data(phydev, short_center_tap_errata,
+ int ret;
+
+ ret = lanphy_write_reg_data(phydev, short_center_tap_errata,
ARRAY_SIZE(short_center_tap_errata));
+ if (ret)
+ return ret;
+
+ return lanphy_write_reg_data(phydev, waketx_timer_errata,
+ ARRAY_SIZE(waketx_timer_errata));
}
static int lan8842_config_init(struct phy_device *phydev)
--
2.34.1
next prev parent reply other threads:[~2025-10-31 12:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 12:16 [PATCH net v4 0/2] net: phy: micrel: lan8842 erratas Horatiu Vultur
2025-10-31 12:16 ` [PATCH net v4 1/2] net: phy: micrel: lan8842 errata Horatiu Vultur
2025-10-31 14:59 ` Russell King (Oracle)
2025-10-31 12:16 ` Horatiu Vultur [this message]
2025-10-31 15:00 ` [PATCH net v4 2/2] " Russell King (Oracle)
2025-11-04 1:10 ` [PATCH net v4 0/2] net: phy: micrel: lan8842 erratas patchwork-bot+netdevbpf
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=20251031121629.814935-3-horatiu.vultur@microchip.com \
--to=horatiu.vultur@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®