Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 00:30:08 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: e7de5b89b72d - stable/12 - e1000: Fix packet loss on 11th gen and later
Message-ID:  <202302230030.31N0U8U0076001@gitrepo.freebsd.org>

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

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

commit e7de5b89b72da29933f0e7f2852b33b1ba0eb442
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:58 +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 7d079ee5d1b3..9893aa413b2c 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?202302230030.31N0U8U0076001>