git: b1da641d23a9 - main - e1000: Preserve errors while disabling D0 LPLU

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Tue, 11 Aug 2026 20:59:58 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=b1da641d23a95c4e7f61b7a546938ec8fceb47e7

commit b1da641d23a95c4e7f61b7a546938ec8fceb47e7
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-11 17:38:39 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-11 20:59:32 +0000

    e1000: Preserve errors while disabling D0 LPLU
    
    Return a PHY write failure immediately when disabling D0 low-power
    link-up on 82571-family controllers.
    
    MFC after:      2 weeks
---
 sys/dev/e1000/e1000_82571.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/dev/e1000/e1000_82571.c b/sys/dev/e1000/e1000_82571.c
index a0a183e326ca..3621f35a819c 100644
--- a/sys/dev/e1000/e1000_82571.c
+++ b/sys/dev/e1000/e1000_82571.c
@@ -959,6 +959,8 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
 		data &= ~IGP02E1000_PM_D0_LPLU;
 		ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
 					     data);
+		if (ret_val)
+			return ret_val;
 		/* LPLU and SmartSpeed are mutually exclusive.  LPLU is used
 		 * during Dx states where the power conservation is most
 		 * important.  During driver activity we should enable