Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 00:29:43 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: b0b1fa9efed8 - stable/13 - e1000: Fix packet loss on 11th gen and later
Message-ID:  <202302230029.31N0Thin072522@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kbowling:

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

commit b0b1fa9efed8d3a4aeb8e365c4f3356de9cc0f6d
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-02-09 00:32:54 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-02-23 00:29:33 +0000

    e1000: Fix packet loss on 11th gen and later
    
    Ungate DMA clock on TGP and later to avoid packet loss.
    
    A similar fix appears in Linux 639e298f432fb058a9496ea16863f53b1ce935fe
    
    This may be needed as far back as SPT but no confirmation from intel or
    other OS yet.
    
    Obtained from:  OpenBSD (if_em_hw.c 1.116)
    Sponsored by:   BBOX.io
    
    (cherry picked from commit 56365902147791994157c3a8f75784dafd46dbd8)
---
 sys/dev/e1000/e1000_ich8lan.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/dev/e1000/e1000_ich8lan.c b/sys/dev/e1000/e1000_ich8lan.c
index f74ef5f9c7b3..86b3d1194edd 100644
--- a/sys/dev/e1000/e1000_ich8lan.c
+++ b/sys/dev/e1000/e1000_ich8lan.c
@@ -5174,6 +5174,13 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
 		snoop = (u32) ~(PCIE_NO_SNOOP_ALL);
 	e1000_set_pcie_no_snoop_generic(hw, snoop);
 
+	/* ungate DMA clock to avoid packet loss */
+	if (mac->type >= e1000_pch_tgp) {
+		uint32_t fflt_dbg = E1000_READ_REG(hw, E1000_FFLT_DBG);
+		fflt_dbg |= (1 << 12);
+		E1000_WRITE_REG(hw, E1000_FFLT_DBG, fflt_dbg);
+	}
+
 	ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
 	ctrl_ext |= E1000_CTRL_EXT_RO_DIS;
 	E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302230029.31N0Thin072522>