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

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7b8d4e.38318.60539d07__38617.7623224043$1786482087$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by kbowling:

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

commit b1da641d23a95c4e7f61b7a546938ec8fceb47e7
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-11 17:38:39 +0000
Commit:     Kevin Bowling <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.