From f9974786551750ea47cd1faf1e739d6a39ec2dc7 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 6 Dec 2017 23:51:31 +0100 Subject: kernel: bump 4.9 to 4.9.67 Refresh patches. Remove upstreamed patches: - generic/190-1-5-e1000e-Fix-error-path-in-link-detection.patch - generic/190-3-5-e1000e-Fix-return-value-test.patch - generic/190-4-5-e1000e-Separate-signaling-for-link-check-link-up.patch - generic/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch - ramips/0102-MIPS-ralink-Fix-MT7628-pinmux.patch - ramips/0103-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function Update patches that no longer apply: - layerscape/815-spi-support-layerscape.patch - ramips/0099-pci-mt7620.patch Compile-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64. Runtime-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64. Signed-off-by: Stijn Tintel --- ...e-Avoid-receiver-overrun-interrupt-bursts.patch | 109 --------------------- 1 file changed, 109 deletions(-) delete mode 100644 target/linux/generic/pending-4.9/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch (limited to 'target/linux/generic/pending-4.9/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch') diff --git a/target/linux/generic/pending-4.9/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch b/target/linux/generic/pending-4.9/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch deleted file mode 100644 index b42fed293d..0000000000 --- a/target/linux/generic/pending-4.9/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch +++ /dev/null @@ -1,109 +0,0 @@ -From patchwork Fri Jul 21 18:36:27 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [5/5] e1000e: Avoid receiver overrun interrupt bursts -From: Benjamin Poirier -X-Patchwork-Id: 9857493 -Message-Id: <20170721183627.13373-5-bpoirier@suse.com> -To: Jeff Kirsher -Cc: Lennart Sorensen , - intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, - linux-kernel@vger.kernel.org -Date: Fri, 21 Jul 2017 11:36:27 -0700 - -When e1000e_poll() is not fast enough to keep up with incoming traffic, the -adapter (when operating in msix mode) raises the Other interrupt to signal -Receiver Overrun. - -This is a double problem because 1) at the moment e1000_msix_other() -assumes that it is only called in case of Link Status Change and 2) if the -condition persists, the interrupt is repeatedly raised again in quick -succession. - -Ideally we would configure the Other interrupt to not be raised in case of -receiver overrun but this doesn't seem possible on this adapter. Instead, -we handle the first part of the problem by reverting to the practice of -reading ICR in the other interrupt handler, like before commit 16ecba59bc33 -("e1000e: Do not read ICR in Other interrupt"). Thanks to commit -0a8047ac68e5 ("e1000e: Fix msi-x interrupt automask") which cleared IAME -from CTRL_EXT, reading ICR doesn't interfere with RxQ0, TxQ0 interrupts -anymore. We handle the second part of the problem by not re-enabling the -Other interrupt right away when there is overrun. Instead, we wait until -traffic subsides, napi polling mode is exited and interrupts are -re-enabled. - -Reported-by: Lennart Sorensen -Fixes: 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt") -Signed-off-by: Benjamin Poirier ---- - drivers/net/ethernet/intel/e1000e/defines.h | 1 + - drivers/net/ethernet/intel/e1000e/netdev.c | 33 +++++++++++++++++++++++------ - 2 files changed, 27 insertions(+), 7 deletions(-) - ---- a/drivers/net/ethernet/intel/e1000e/defines.h -+++ b/drivers/net/ethernet/intel/e1000e/defines.h -@@ -398,6 +398,7 @@ - #define E1000_ICR_LSC 0x00000004 /* Link Status Change */ - #define E1000_ICR_RXSEQ 0x00000008 /* Rx sequence error */ - #define E1000_ICR_RXDMT0 0x00000010 /* Rx desc min. threshold (0) */ -+#define E1000_ICR_RXO 0x00000040 /* Receiver Overrun */ - #define E1000_ICR_RXT0 0x00000080 /* Rx timer intr (ring 0) */ - #define E1000_ICR_ECCER 0x00400000 /* Uncorrectable ECC Error */ - /* If this bit asserted, the driver should claim the interrupt */ ---- a/drivers/net/ethernet/intel/e1000e/netdev.c -+++ b/drivers/net/ethernet/intel/e1000e/netdev.c -@@ -1905,12 +1905,30 @@ static irqreturn_t e1000_msix_other(int - struct net_device *netdev = data; - struct e1000_adapter *adapter = netdev_priv(netdev); - struct e1000_hw *hw = &adapter->hw; -+ u32 icr; -+ bool enable = true; - -- hw->mac.get_link_status = true; -+ icr = er32(ICR); -+ if (icr & E1000_ICR_RXO) { -+ ew32(ICR, E1000_ICR_RXO); -+ enable = false; -+ /* napi poll will re-enable Other, make sure it runs */ -+ if (napi_schedule_prep(&adapter->napi)) { -+ adapter->total_rx_bytes = 0; -+ adapter->total_rx_packets = 0; -+ __napi_schedule(&adapter->napi); -+ } -+ } -+ if (icr & E1000_ICR_LSC) { -+ ew32(ICR, E1000_ICR_LSC); -+ hw->mac.get_link_status = true; -+ /* guard against interrupt when we're going down */ -+ if (!test_bit(__E1000_DOWN, &adapter->state)) { -+ mod_timer(&adapter->watchdog_timer, jiffies + 1); -+ } -+ } - -- /* guard against interrupt when we're going down */ -- if (!test_bit(__E1000_DOWN, &adapter->state)) { -- mod_timer(&adapter->watchdog_timer, jiffies + 1); -+ if (enable && !test_bit(__E1000_DOWN, &adapter->state)) { - ew32(IMS, E1000_IMS_OTHER); - } - -@@ -2683,7 +2701,8 @@ static int e1000e_poll(struct napi_struc - napi_complete_done(napi, work_done); - if (!test_bit(__E1000_DOWN, &adapter->state)) { - if (adapter->msix_entries) -- ew32(IMS, adapter->rx_ring->ims_val); -+ ew32(IMS, adapter->rx_ring->ims_val | -+ E1000_IMS_OTHER); - else - e1000_irq_enable(adapter); - } -@@ -4178,7 +4197,7 @@ static void e1000e_trigger_lsc(struct e1 - struct e1000_hw *hw = &adapter->hw; - - if (adapter->msix_entries) -- ew32(ICS, E1000_ICS_OTHER); -+ ew32(ICS, E1000_ICS_LSC | E1000_ICS_OTHER); - else - ew32(ICS, E1000_ICS_LSC); - } -- cgit v1.2.3