e1000e: fix flow control stuck off after link partner reset
Subsystems (4)
PATCH 1/1 e1000e: fix flow control stuck off after link partner reset
On an I219 (pch_spt+) copper with jumbo MTU enabled, a link partner reset (e.g. a switch reboot) can leave the PHY's pause advertisement bits dropped. Nothing re-asserts them on link-up, so every renegotiation resolves flow control to none. rx_crc_errors climb and traffic stalls until the interface is manually reset. Observed on I219-LM (8086:15b7) at MTU 9000 behind a switch that was power-cycled.
In the watchdog, detect a completed autonegotiation that resolved to no flow control despite pause being requested and the pause bits missing from the advertisement, and schedule reset_task to rebuild the advertisement (as ethtool -r does). Remediation is limited to three attempts, 30s apart, until the next link down.
Remediate via the existing reset path rather than re-asserting the advertisement on link-up; a root-cause rework can follow in net-next.
--- drivers/net/ethernet/intel/e1000e/e1000.h | 11 ++ drivers/net/ethernet/intel/e1000e/netdev.c | 132 +++++++++++++++++++++ 2 files changed, 143 insertions(+)
drivers/net/ethernet/intel/e1000e/e1000.h +11 -0
@@ -210,6 +210,17 @@ struct e1000_adapter {/* track device up/down/testing state */ unsigned long state; +/* Flow-control advertisement-latch auto-recovery. +* These MUST persist across the reinit that remediation triggers +* (the reinit generates its own carrier-up), so they are NOT reset +* on link-up. The holdoff and per-episode attempt budget prevent a +* reset/flap storm against a partner that is still booting or that +* genuinely never advertises pause. +*/ +unsigned long fclatch_last_fix;/* jiffies of last remediation, 0=none */ +u8 fclatch_attempts;/* attempts in the current link episode */ +bool fclatch_gave_up;/* terminal for episode; re-armed on link-down */ +/* Interrupt Throttle Rate */ u32 itr;u32 itr_setting;
drivers/net/ethernet/intel/e1000e/netdev.c +132 -0
156 lines not on this page · raw message
Signature · 1 line
2.47.3
Quoted 16 lines · Craig I. Hagan
On an I219 (pch_spt+) copper with jumbo MTU enabled, a link partner reset (e.g. a switch reboot) can leave the PHY's pause advertisement bits dropped. Nothing re-asserts them on link-up, so every renegotiation resolves flow control to none.
rx_crc_errorsclimb and traffic stalls until the interface is manually reset. Observed on I219-LM (8086:15b7) at MTU 9000 behind a switch that was power-cycled.In the watchdog, detect a completed autonegotiation that resolved to no flow control despite pause being requested and the pause bits missing from the advertisement, and schedule
reset_taskto rebuild the advertisement (as ethtool -r does). Remediation is limited to three attempts, 30s apart, until the next link down.Remediate via the existing reset path rather than re-asserting the advertisement on link-up; a root-cause rework can follow in net-next.
Quoted 6 lines
Fixes 79849ebc0e06 ("e1000e: initial support for i219")Assisted-by LLMSigned-off-by Craig I. Hagan <[email protected]>---
I was able to repro this on an I219-LM laptop by link cycling with MEI runtime PM enabled while the NIC runtime PM was disabled.
At 1500 MTU flow control still doesn't end up in the right state, but traffic otherwise flows normally. I don't think traffic is stalling because flow control is off, I think it's stalling because e1000_lv_jumbo_workaround_ich8lan didn't run after the PHY reset.
I didn't try your patch, but there's a four line fix. Where the watchdog resets just the PHY when the MAC exits DMoff state, set FLAG_RESTART_NOW instead of resetting the PHY, then goto link_up. This works for me at both 1500 and 9000 MTU.
If runtime PM were enabled on your NIC it would reset anyway and avoid this error.
See:
Quoted 4 lines · Matt Vollrath
I didn't try your patch, but there's a four line fix. Where the watchdog resets just the PHY when the MAC exits DMoff state, set
FLAG_RESTART_NOWinstead of resetting the PHY, then gotolink_up. This works for me at both 1500 and 9000 MTU.
Thanks Matt,
I've tested this approach on two I219-LM boxes, each attached to a different switch:
one a TP-Link TL-SG108PE V3, and the other a Cisco Catalyst 9200.
On the Cisco with jumbo frames, I'm seeing, via a diagnostic message, that the fix appears to fire and work. I have also noticed that I no longer see it on every boot, but this may be correct as I've not seen traffic stalls.
With 1500 mtu, I'm seeing it engage fairly regularly with the TP-Link but not the Cisco. I'm guessing it is related to how the Cisco negotiates. In both cases traffic doesn't seem to stall.
I think you are correct about flow control being a red herring since both switches advertise no pause (Flow Control: None) before and after recovery.
I'd like to drop my patch in favour of your fix.
How should I proceed, should I propose a patch with suggested-by you, or with your authorship and tested by me?
For completeness, here is the diff I tested (I added an e_info so I could see it fire on the test rig; happy to drop that line - it isn't needed for the fix):
drivers/net/ethernet/intel/e1000e/netdev.c +10 -3
@@ -5254,9 +5254,16 @@usleep_range (10000 ,20000 ); pcim_state =er32 (STATUS ); -/* Checking if MAC exited DMoff state */ -if (!(pcim_state &E1000_STATUS_PCIM_STATE )) -e1000_phy_hw_reset (&adapter->hw); +/* Checking if MAC exited DMoff state. A bare +* PHY reset here does not re-run the jumbo +* workaround (e1000_lv_jumbo_workaround_ich8lan), +* so request a full reset instead, which does. +*/ +if (!(pcim_state &E1000_STATUS_PCIM_STATE )) { +e_info ("full reset on DMoff exit to restore jumbo-frame configuration\n" ); + adapter->flags |=FLAG_RESTART_NOW ; + goto link_up; + } } }
Quoted 18 lines · Craig I. Hagan
Quoted 4 lines · Matt Vollrath
I didn't try your patch, but there's a four line fix. Where the watchdog resets just the PHY when the MAC exits DMoff state, set
FLAG_RESTART_NOWinstead of resetting the PHY, then gotolink_up. This works for me at both 1500 and 9000 MTU.Thanks Matt,
I've tested this approach on two I219-LM boxes, each attached to a different switch:
one a TP-Link TL-SG108PE V3, and the other a Cisco Catalyst 9200.On the Cisco with jumbo frames, I'm seeing, via a diagnostic message, that the fix appears to fire and work. I have also noticed that I no longer see it on every boot, but this may be correct as I've not seen traffic stalls.
With 1500 mtu, I'm seeing it engage fairly regularly with the TP-Link but not the Cisco. I'm guessing it is related to how the Cisco negotiates. In both cases traffic doesn't seem to stall.
Quoted 8 lines
I think you are correct about flow control being a red herring since both switches advertise no pause (Flow Control: None) before and after recovery.
I'd like to drop my patch in favour of your fix.
How should I proceed, should I propose a patch with suggested-by you, or with your authorship and tested by me?
Feel free to add:
Quoted 3 lines
For completeness, here is the diff I tested (I added an
e_infoso I could see it fire on the test rig; happy to drop that line - it isn't needed for the fix):
I would drop the e_info.
Quoted 7 lines
drivers/net/ethernet/intel/e1000e/netdev.c +0
-0@@ -5254,9 +5254,16 @@usleep_range (10000 ,20000 );
drivers/net/ethernet/intel/e1000e/netdev.c line 5261
Quoted 10 lines
drivers/net/ethernet/intel/e1000e/netdev.c +5
-3pcim_state =er32 (STATUS ); -/* Checking if MAC exited DMoff state */ -if (!(pcim_state &E1000_STATUS_PCIM_STATE )) -e1000_phy_hw_reset (&adapter->hw); +/* Checking if MAC exited DMoff state. A bare +* PHY reset here does not re-run the jumbo +* workaround (e1000_lv_jumbo_workaround_ich8lan), +* so request a full reset instead, which does. +*/
My two cents is that this comment is over-specific. In most places a bare PHY reset is not used, so the transition is toward less exceptional.
Quoted 8 lines
drivers/net/ethernet/intel/e1000e/netdev.c +5
-0+if (!(pcim_state &E1000_STATUS_PCIM_STATE )) { +e_info ("full reset on DMoff exit to restore jumbo-frame configuration\n" ); + adapter->flags |=FLAG_RESTART_NOW ; + goto link_up; + } } }
PATCH v2 1/1 e1000e: restore jumbo config after DMoff exit
In reply to Craig I. HaganOn an I219 (pch_spt+) at jumbo MTU, after a link partner reset (e.g. a switch reboot) the interface can come back up unable to pass traffic until it is manually reset. Observed on I219-LM (8086:15b7) at MTU 9000.
When the MAC exits the DMoff state on link-up, the watchdog resets only the PHY. A bare PHY reset does not re-run the jumbo-frame workaround (e1000_lv_jumbo_workaround_ich8lan), so the jumbo configuration is left unapplied and traffic stalls. This was seen with NIC runtime PM disabled; if runtime PM were enabled, the device should go through a full reset on resume, avoiding this issue.
Request a full reset (FLAG_RESTART_NOW) instead of the bare PHY reset when the MAC exits DMoff, so the normal reset path re-applies the jumbo-frame configuration.
---
v2: Rework per review. Instead of the fc-latch autoneg-restart
approach, request a full reset on DMoff exit so the jumbo-frame workaround is re-applied (root cause identified by Matt Vollrath). Drop the diagnostic e_info. v1:
https://lore.kernel.org/netdev/[email protected]/
drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/e1000e/netdev.c +5 -3
@@ -5264,9 +5264,11 @@ static void e1000_watchdog_task(struct work_struct *work)usleep_range (10000 ,20000 ); pcim_state =er32 (STATUS ); -/* Checking if MAC exited DMoff state */ -if (!(pcim_state &E1000_STATUS_PCIM_STATE )) -e1000_phy_hw_reset (&adapter->hw); +/* MAC exited DMoff; do a full reset. */ +if (!(pcim_state &E1000_STATUS_PCIM_STATE )) { + adapter->flags |=FLAG_RESTART_NOW ; + goto link_up; + } } }
Signature · 1 line
2.47.3
Re: [PATCH iwl-net v2] e1000e: restore jumbo config after DMoff exit
Quoted 11 lines · Craig I. Hagan
On an I219 (pch_spt+) at jumbo MTU, after a link partner reset (e.g. a switch reboot) the interface can come back up unable to pass traffic until it is manually reset. Observed on I219-LM (8086:15b7) at MTU 9000.
When the MAC exits the DMoff state on link-up, the watchdog resets only the PHY. A bare PHY reset does not re-run the jumbo-frame workaround (
e1000_lv_jumbo_workaround_ich8lan), so the jumbo configuration is left unapplied and traffic stalls. This was seen with NIC runtime PM disabled; if runtime PM were enabled, the device should go through a full reset on resume, avoiding this issue.
Quoted 5 lines
Request a full reset (
FLAG_RESTART_NOW) instead of the bare PHY reset when the MAC exits DMoff, so the normal reset path re-applies the jumbo-frame configuration.Fixes 2e7256f12cdb ("e1000e: Check the PCIm state")
Wasn't this bug introduced in def4ec6dce39 ? The more recent commit seems like it just adds a pre-condition for the DMoff workaround. Tagging that commit could cause stable to miss backport to 5.10.
Otherwise:
Quoted 35 lines
Reported-by Fabio Sabai <[email protected]>Suggested-by Matt Vollrath <[email protected]>Assisted-by LLMSigned-off-by Craig I. Hagan <[email protected]>---
v2: Rework per review. Instead of the fc-latch autoneg-restart
approach, request a full reset on DMoff exit so the jumbo-frame workaround is re-applied (root cause identified by Matt Vollrath). Drop the diagnostice_info. v1:
https://lore.kernel.org/netdev/[email protected]/drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/e1000e/netdev.c +5
-3@@ -5264,9 +5264,11 @@ static void e1000_watchdog_task(struct work_struct *work)usleep_range (10000 ,20000 ); pcim_state =er32 (STATUS ); -/* Checking if MAC exited DMoff state */ -if (!(pcim_state &E1000_STATUS_PCIM_STATE )) -e1000_phy_hw_reset (&adapter->hw); +/* MAC exited DMoff; do a full reset. */ +if (!(pcim_state &E1000_STATUS_PCIM_STATE )) { + adapter->flags |=FLAG_RESTART_NOW ; + goto link_up; + } } }
PATCH v3 1/1 e1000e: restore jumbo config after DMoff exit
On an I219 (pch_spt+) at jumbo MTU, after a link partner reset (e.g. a switch reboot) the interface can come back up unable to pass traffic until it is manually reset. Observed on I219-LM (8086:15b7) at MTU 9000.
When the MAC exits the DMoff state on link-up, the watchdog resets only the PHY. A bare PHY reset does not re-run the jumbo-frame workaround (e1000_lv_jumbo_workaround_ich8lan), so the jumbo configuration is left unapplied and traffic stalls. This was seen with NIC runtime PM disabled; if runtime PM were enabled, the device should go through a full reset on resume, avoiding this issue.
Request a full reset (FLAG_RESTART_NOW) instead of the bare PHY reset when the MAC exits DMoff, so the normal reset path re-applies the jumbo-frame configuration.
---
v3: Correct the Fixes: tag to def4ec6dce39 ("e1000e: PCIm function
state support"), which introduced the DMoff-exit bare PHY reset; 2e7256f12cdb only added a pre-condition. This lets stable reach the affected trees (v5.3+, including 5.4/5.10). Add Reviewed-by/ Tested-by from Matt Vollrath.
v2: Rework per review: request a full reset on DMoff exit so the
jumbo-frame workaround is re-applied (root cause identified by Matt Vollrath); drop the diagnostic e_info. v1:
https://lore.kernel.org/netdev/[email protected]/
drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/e1000e/netdev.c +5 -3
@@ -5264,9 +5264,11 @@ static void e1000_watchdog_task(struct work_struct *work)usleep_range (10000 ,20000 ); pcim_state =er32 (STATUS ); -/* Checking if MAC exited DMoff state */ -if (!(pcim_state &E1000_STATUS_PCIM_STATE )) -e1000_phy_hw_reset (&adapter->hw); +/* MAC exited DMoff; do a full reset. */ +if (!(pcim_state &E1000_STATUS_PCIM_STATE )) { + adapter->flags |=FLAG_RESTART_NOW ; + goto link_up; + } } }
Signature · 1 line
2.47.3
RE: [PATCH iwl-net v3] e1000e: restore jumbo config after DMoff exit
Quoted 84 lines
-----Original Message-----
From: Craig I. Hagan <[email protected]>
Sent: Monday, September 28, 2026 11:06 PM
To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>
Cc: Andrew Lunn <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; intel- [email protected]; [email protected]; linux- [email protected]; [email protected]; Fabio Sabai <[email protected]>; Matt Vollrath <[email protected]>
Subject: [PATCH iwl-net v3] e1000e: restore jumbo config after DMoff exitOn an I219 (pch_spt+) at jumbo MTU, after a link partner reset (e.g. a switch reboot) the interface can come back up unable to pass traffic until it is manually reset. Observed on I219-LM (8086:15b7) at MTU 9000.
When the MAC exits the DMoff state on link-up, the watchdog resets only the PHY. A bare PHY reset does not re-run the jumbo-frame workaround (
e1000_lv_jumbo_workaround_ich8lan), so the jumbo configuration is left unapplied and traffic stalls. This was seen with NIC runtime PM disabled; if runtime PM were enabled, the device should go through a full reset on resume, avoiding this issue.Request a full reset (
FLAG_RESTART_NOW) instead of the bare PHY reset when the MAC exits DMoff, so the normal reset path re-applies the jumbo-frame configuration.Fixes def4ec6dce39 ("e1000e: PCIm function state support")Reported-by Fabio Sabai <[email protected]>Suggested-by Matt Vollrath <[email protected]>Reviewed-by Matt Vollrath <[email protected]>Tested-by Matt Vollrath <[email protected]>Assisted-by LLMSigned-off-by Craig I. Hagan <[email protected]>---
v3: Correct the Fixes: tag todef4ec6dce39("e1000e: PCIm function
state support"), which introduced the DMoff-exit bare PHY reset;2e7256f12cdbonly added a pre-condition. This lets stable reach the affected trees (v5.3+, including 5.4/5.10). Add Reviewed-by/ Tested-by from Matt Vollrath.
v2: Rework per review: request a full reset on DMoff exit so the
jumbo-frame workaround is re-applied (root cause identified by Matt Vollrath); drop the diagnostice_info. v1:
https://lore.kernel.org/netdev/20260923235832.473-1-
[email protected]/drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/e1000e/netdev.c +0
-1@@ -5264,9 +5264,11 @@ static void e1000_watchdog_task(struct work_struct *work) usleep_range(10000, 20000); pcim_state =er32 (STATUS ); -/* Checking if MAC exited DMoff state */
drivers/net/ethernet/intel/e1000e/netdev.c +0
-1- if (!(pcim_state &
E1000_STATUS_PCIM_STATE))drivers/net/ethernet/intel/e1000e/netdev.c +0
-1- e1000_phy_hw_reset(&adapter-Quoted 1 line
hw);
drivers/net/ethernet/intel/e1000e/netdev.c +1
-0+/* MAC exited DMoff; do a full reset. */
drivers/net/ethernet/intel/e1000e/netdev.c +1
-0+ if (!(pcim_state &
E1000_STATUS_PCIM_STATE)) {drivers/net/ethernet/intel/e1000e/netdev.c +1
-0+ adapter->flags |=
FLAG_RESTART_NOW;drivers/net/ethernet/intel/e1000e/netdev.c +2
-1+ goto link_up; + } } } --
Quoted 1 line
2.47.3
Kadosh, MoriyaX
Tested-byRe: [PATCH iwl-net v3] e1000e: restore jumbo config after DMoff exit
Quoted 83 lines · Aleksandr
Quoted 83 lines
-----Original Message-----
From: Craig I. Hagan <[email protected]>
Sent: Monday, September 28, 2026 11:06 PM
To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>
Cc: Andrew Lunn <[email protected]>; David S . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; intel- [email protected]; [email protected]; linux- [email protected]; [email protected]; Fabio Sabai <[email protected]>; Matt Vollrath <[email protected]>
Subject: [PATCH iwl-net v3] e1000e: restore jumbo config after DMoff exitOn an I219 (pch_spt+) at jumbo MTU, after a link partner reset (e.g. a switch reboot) the interface can come back up unable to pass traffic until it is manually reset. Observed on I219-LM (8086:15b7) at MTU 9000.
When the MAC exits the DMoff state on link-up, the watchdog resets only the PHY. A bare PHY reset does not re-run the jumbo-frame workaround (
e1000_lv_jumbo_workaround_ich8lan), so the jumbo configuration is left unapplied and traffic stalls. This was seen with NIC runtime PM disabled; if runtime PM were enabled, the device should go through a full reset on resume, avoiding this issue.Request a full reset (
FLAG_RESTART_NOW) instead of the bare PHY reset when the MAC exits DMoff, so the normal reset path re-applies the jumbo-frame configuration.Fixes def4ec6dce39 ("e1000e: PCIm function state support")Reported-by Fabio Sabai <[email protected]>Suggested-by Matt Vollrath <[email protected]>Reviewed-by Matt Vollrath <[email protected]>Tested-by Matt Vollrath <[email protected]>Assisted-by LLMSigned-off-by Craig I. Hagan <[email protected]>---
v3: Correct the Fixes: tag todef4ec6dce39("e1000e: PCIm function
state support"), which introduced the DMoff-exit bare PHY reset;2e7256f12cdbonly added a pre-condition. This lets stable reach the affected trees (v5.3+, including 5.4/5.10). Add Reviewed-by/ Tested-by from Matt Vollrath.
v2: Rework per review: request a full reset on DMoff exit so the
jumbo-frame workaround is re-applied (root cause identified by Matt Vollrath); drop the diagnostice_info. v1:
https://lore.kernel.org/netdev/20260923235832.473-1-
[email protected]/drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/e1000e/netdev.c +0
-1@@ -5264,9 +5264,11 @@ static void e1000_watchdog_task(struct work_struct *work) usleep_range(10000, 20000); pcim_state =er32 (STATUS ); -/* Checking if MAC exited DMoff state */
drivers/net/ethernet/intel/e1000e/netdev.c +0
-1- if (!(pcim_state &
E1000_STATUS_PCIM_STATE))drivers/net/ethernet/intel/e1000e/netdev.c +0
-1- e1000_phy_hw_reset(&adapter-Quoted 1 line
hw);
drivers/net/ethernet/intel/e1000e/netdev.c +1
-0+/* MAC exited DMoff; do a full reset. */
drivers/net/ethernet/intel/e1000e/netdev.c +1
-0+ if (!(pcim_state &
E1000_STATUS_PCIM_STATE)) {drivers/net/ethernet/intel/e1000e/netdev.c +1
-0+ adapter->flags |=
FLAG_RESTART_NOW;drivers/net/ethernet/intel/e1000e/netdev.c +2
-0+ goto link_up; + } } }
Quoted 4 lines
Quoted 2 lines
--
2.47.3Reviewed-by Aleksandr Loktionov <[email protected]>