From c90778ad70e2cf0844f0b10f8aad5d8cac11177a Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 6 Oct 2020 16:08:35 +0200 Subject: net: e1000: add defaults for i210 TX/RX PBSIZE Set the defaults on probe for the packet buffer size registers for the i210. The TX/RX PBSIZE register of the i210 resets to its default value only at power-on - see Intel Ethernet Controller I210 Datasheet rev 3.5 chapter 8.3 'Internal Packet Buffer Size Registers'. If something (another driver, another OS, etc.) modifies this register from its default value, the e1000 driver doesn't function correctly. It detects a hang of the transmitter and continuously resets the adapter. Here we set this value to its default when resetting the i210 to resolve this issue. Signed-off-by: Christian Gmeiner --- drivers/net/e1000.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/net/e1000.c') diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 49be7667021..8e6c755f641 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -1644,6 +1644,11 @@ e1000_reset_hw(struct e1000_hw *hw) E1000_WRITE_REG(hw, TCTL, E1000_TCTL_PSP); E1000_WRITE_FLUSH(hw); + if (hw->mac_type == e1000_igb) { + E1000_WRITE_REG(hw, RXPBS, I210_RXPBSIZE_DEFAULT); + E1000_WRITE_REG(hw, TXPBS, I210_TXPBSIZE_DEFAULT); + } + /* The tbi_compatibility_on Flag must be cleared when Rctl is cleared. */ hw->tbi_compatibility_on = false; -- cgit v1.2.3