git: 563659021477 - main - e1000: Fix packet loss on 11th gen and later
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Feb 2023 00:51:57 UTC
The branch main has been updated by kbowling (ports committer):
URL: https://cgit.FreeBSD.org/src/commit/?id=56365902147791994157c3a8f75784dafd46dbd8
commit 56365902147791994157c3a8f75784dafd46dbd8
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-02-09 00:32:54 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-02-09 00:50: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)
MFC after: 2 weeks
Sponsored by: BBOX.io
---
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 9c640e7b9667..40db185454e1 100644
--- a/sys/dev/e1000/e1000_ich8lan.c
+++ b/sys/dev/e1000/e1000_ich8lan.c
@@ -5167,6 +5167,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);