diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-06-23 09:47:05 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-06-23 09:47:05 +0000 |
commit | fd32dc1377d4874015355ccc83d38e490bac407d (patch) | |
tree | d84aeb0bd2c0b8df3b288d823b6614f154abe1b6 | |
parent | 242b1a648340931d3451f5daf28b7b1d6afeb3bd (diff) |
ungate DMA clock on >= tgp to avoid packet loss on Alder Lake
chicken bit set in linux but not documented anywhere I can find
ok claudio@
-rw-r--r-- | sys/dev/pci/if_em_hw.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/if_em_hw.c b/sys/dev/pci/if_em_hw.c index 727c431921d..6d230587e99 100644 --- a/sys/dev/pci/if_em_hw.c +++ b/sys/dev/pci/if_em_hw.c @@ -31,7 +31,7 @@ *******************************************************************************/ -/* $OpenBSD: if_em_hw.c,v 1.115 2022/06/23 09:38:28 jsg Exp $ */ +/* $OpenBSD: if_em_hw.c,v 1.116 2022/06/23 09:47:04 jsg Exp $ */ /* * if_em_hw.c Shared functions for accessing and configuring the MAC */ @@ -1846,6 +1846,13 @@ em_init_hw(struct em_softc *sc) em_set_pci_ex_no_snoop(hw, snoop); } + /* ungate DMA clock to avoid packet loss */ + if (hw->mac_type >= em_pch_tgp) { + uint32_t fflt_dbg = E1000_READ_REG(hw, FFLT_DBG); + fflt_dbg |= (1 << 12); + E1000_WRITE_REG(hw, FFLT_DBG, fflt_dbg); + } + if (hw->device_id == E1000_DEV_ID_82546GB_QUAD_COPPER || hw->device_id == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3) { ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); |