Skip to content

Commit

Permalink
UBUNTU: SAUCE: e1000e: Fixing packet loss issues on new platforms
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1930754

Update the HW MAC initialization flow. Do not gate DMA clock from
the modPHY block. Keeping this clock will prevent drop packets sent
in burst mode on the Kumeran interface.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377
Fixes: bc7f75f ("New pci-express e1000 driver");
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Mark Pearson <markpearson@lenovo.com>
(cherry picked from
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20210922065542.3780389-1-sasha.neftin@intel.com/)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
  • Loading branch information
Sasha Neftin authored and Chia-Lin Kao (AceLan) committed Sep 27, 2021
1 parent 27570be commit 9b992c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/net/ethernet/intel/e1000e/ich8lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -4802,7 +4802,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
u32 ctrl_ext, txdctl, snoop;
u32 ctrl_ext, txdctl, snoop, fflt_dbg;
s32 ret_val;
u16 i;

Expand Down Expand Up @@ -4861,6 +4861,15 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)
snoop = (u32)~(PCIE_NO_SNOOP_ALL);
e1000e_set_pcie_no_snoop(hw, snoop);

/* Enable workaround for packet loss issue on TGP PCH
* Do not gate DMA clock from the modPHY block
*/
if (mac->type >= e1000_pch_tgp) {
fflt_dbg = er32(FFLT_DBG);
fflt_dbg |= E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK;
ew32(FFLT_DBG, fflt_dbg);
}

ctrl_ext = er32(CTRL_EXT);
ctrl_ext |= E1000_CTRL_EXT_RO_DIS;
ew32(CTRL_EXT, ctrl_ext);
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/e1000e/ich8lan.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@
/* Proprietary Latency Tolerance Reporting PCI Capability */
#define E1000_PCI_LTR_CAP_LPT 0xA8

/* Don't gate wake DMA clock */
#define E1000_FFLT_DBG_DONT_GATE_WAKE_DMA_CLK 0x1000

void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw);
void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
bool state);
Expand Down

0 comments on commit 9b992c0

Please sign in to comment.