git: 53e471161604 - main - e1000: fix reset for 82580

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7b8d48.36dd1.1af0226f__12503.2411700644$1786482028$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by kbowling:

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

commit 53e4711616041a668ab61f2ce86c9fa139ab67a9
Author:     Barbara Skobiej <[email protected]>
AuthorDate: 2025-02-06 16:08:45 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-11 20:59:31 +0000

    e1000: fix reset for 82580
    
    DPDK commit message
    
    net/e1000/base: fix reset for 82580
    
    Fix setting device reset status bit in e1000_reset_hw_82580() function
    for 82580 by first reading the register value, and then setting the
    device reset bit.
    
    Fixes: af75078fece3 ("first public release")
    Cc: [email protected]
    
    Signed-off-by: Barbara Skobiej <[email protected]>
    Signed-off-by: Anatoly Burakov <[email protected]>
    Acked-by: Bruce Richardson <[email protected]>
    
    Obtained from:  DPDK (88a1eb79ef)
    MFC after:      2 weeks
---
 sys/dev/e1000/e1000_82575.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c
index f8b512266acf..ee6bbd5a1b9d 100644
--- a/sys/dev/e1000/e1000_82575.c
+++ b/sys/dev/e1000/e1000_82575.c
@@ -2230,7 +2230,7 @@ static s32 e1000_reset_hw_82580(struct e1000_hw *hw)
 	s32 ret_val = E1000_SUCCESS;
 	/* BH SW mailbox bit in SW_FW_SYNC */
 	u16 swmbsw_mask = E1000_SW_SYNCH_MB;
-	u32 ctrl;
+	u32 ctrl, status;
 	bool global_device_reset = hw->dev_spec._82575.global_device_reset;
 
 	DEBUGFUNC("e1000_reset_hw_82580");
@@ -2295,7 +2295,9 @@ static s32 e1000_reset_hw_82580(struct e1000_hw *hw)
 	}
 
 	/* clear global device reset status bit */
-	E1000_WRITE_REG(hw, E1000_STATUS, E1000_STAT_DEV_RST_SET);
+	status = E1000_READ_REG(hw, E1000_STATUS);
+	E1000_WRITE_REG(hw, E1000_STATUS,
+	    status | E1000_STAT_DEV_RST_SET);
 
 	/* Clear any pending interrupt events. */
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
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.