Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcf2b868 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller
Browse files

r8169: move disabling interrupt coalescing to RTL8169/RTL8168 init



RTL8125 doesn't support the same coalescing registers, therefore move
this initialization to the 8168/6169-specific init.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce37115e
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -5087,6 +5087,9 @@ static void rtl_hw_start_8168(struct rtl8169_private *tp)
		RTL_W8(tp, MaxTxPacketSize, TxPacketMax);
		RTL_W8(tp, MaxTxPacketSize, TxPacketMax);


	rtl_hw_config(tp);
	rtl_hw_config(tp);

	/* disable interrupt coalescing */
	RTL_W16(tp, IntrMitigate, 0x0000);
}
}


static void rtl_hw_start_8169(struct rtl8169_private *tp)
static void rtl_hw_start_8169(struct rtl8169_private *tp)
@@ -5110,6 +5113,9 @@ static void rtl_hw_start_8169(struct rtl8169_private *tp)
	rtl8169_set_magic_reg(tp, tp->mac_version);
	rtl8169_set_magic_reg(tp, tp->mac_version);


	RTL_W32(tp, RxMissed, 0);
	RTL_W32(tp, RxMissed, 0);

	/* disable interrupt coalescing */
	RTL_W16(tp, IntrMitigate, 0x0000);
}
}


static void rtl_hw_start(struct  rtl8169_private *tp)
static void rtl_hw_start(struct  rtl8169_private *tp)
@@ -5128,8 +5134,6 @@ static void rtl_hw_start(struct rtl8169_private *tp)
	rtl_set_rx_tx_desc_registers(tp);
	rtl_set_rx_tx_desc_registers(tp);
	rtl_lock_config_regs(tp);
	rtl_lock_config_regs(tp);


	/* disable interrupt coalescing */
	RTL_W16(tp, IntrMitigate, 0x0000);
	/* Initially a 10 us delay. Turned it into a PCI commit. - FR */
	/* Initially a 10 us delay. Turned it into a PCI commit. - FR */
	RTL_R8(tp, IntrMask);
	RTL_R8(tp, IntrMask);
	RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb);
	RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb);