From ba30fbd48a53b440e00ce4bc98a1ce4e52a65e46 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 15 Jul 2019 12:43:18 +0200 Subject: [PATCH] 4.4-stable patches added patches: e1000e-start-network-tx-queue-only-when-link-is-up.patch --- queue-4.14/series | 2 + queue-4.19/series | 2 + ...etwork-tx-queue-only-when-link-is-up.patch | 74 +++++++++++++++++++ queue-4.4/series | 1 + queue-4.9/series | 2 + queue-5.1/series | 2 + queue-5.2/series | 2 + 7 files changed, 85 insertions(+) create mode 100644 queue-4.19/series create mode 100644 queue-4.4/e1000e-start-network-tx-queue-only-when-link-is-up.patch create mode 100644 queue-5.1/series create mode 100644 queue-5.2/series diff --git a/queue-4.14/series b/queue-4.14/series index 491d8681536..fa824e815b6 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -1,3 +1,5 @@ +revert-e1000e-fix-cyclic-resets-at-link-up-with-active-tx.patch +e1000e-start-network-tx-queue-only-when-link-is-up.patch crypto-talitos-rename-alternative-aead-algos.patch input-elantech-enable-middle-button-support-on-2-thi.patch samples-bpf-fix-to-change-the-buffer-size-for-read.patch diff --git a/queue-4.19/series b/queue-4.19/series new file mode 100644 index 00000000000..1bd1db664ba --- /dev/null +++ b/queue-4.19/series @@ -0,0 +1,2 @@ +revert-e1000e-fix-cyclic-resets-at-link-up-with-active-tx.patch +e1000e-start-network-tx-queue-only-when-link-is-up.patch diff --git a/queue-4.4/e1000e-start-network-tx-queue-only-when-link-is-up.patch b/queue-4.4/e1000e-start-network-tx-queue-only-when-link-is-up.patch new file mode 100644 index 00000000000..01030d052d9 --- /dev/null +++ b/queue-4.4/e1000e-start-network-tx-queue-only-when-link-is-up.patch @@ -0,0 +1,74 @@ +From d17ba0f616a08f597d9348c372d89b8c0405ccf3 Mon Sep 17 00:00:00 2001 +From: Konstantin Khlebnikov +Date: Wed, 17 Apr 2019 11:13:20 +0300 +Subject: e1000e: start network tx queue only when link is up + +From: Konstantin Khlebnikov + +commit d17ba0f616a08f597d9348c372d89b8c0405ccf3 upstream. + +Driver does not want to keep packets in Tx queue when link is lost. +But present code only reset NIC to flush them, but does not prevent +queuing new packets. Moreover reset sequence itself could generate +new packets via netconsole and NIC falls into endless reset loop. + +This patch wakes Tx queue only when NIC is ready to send packets. + +This is proper fix for problem addressed by commit 0f9e980bf5ee +("e1000e: fix cyclic resets at link up with active tx"). + +Signed-off-by: Konstantin Khlebnikov +Suggested-by: Alexander Duyck +Tested-by: Joseph Yasi +Tested-by: Aaron Brown +Tested-by: Oleksandr Natalenko +Signed-off-by: Jeff Kirsher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/intel/e1000e/netdev.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/intel/e1000e/netdev.c ++++ b/drivers/net/ethernet/intel/e1000e/netdev.c +@@ -4171,7 +4171,7 @@ int e1000e_up(struct e1000_adapter *adap + e1000_configure_msix(adapter); + e1000_irq_enable(adapter); + +- netif_start_queue(adapter->netdev); ++ /* Tx queue started by watchdog timer when link is up */ + + /* fire a link change interrupt to start the watchdog */ + if (adapter->msix_entries) +@@ -4539,6 +4539,7 @@ static int e1000_open(struct net_device + pm_runtime_get_sync(&pdev->dev); + + netif_carrier_off(netdev); ++ netif_stop_queue(netdev); + + /* allocate transmit descriptors */ + err = e1000e_setup_tx_resources(adapter->tx_ring); +@@ -4599,7 +4600,6 @@ static int e1000_open(struct net_device + e1000_irq_enable(adapter); + + adapter->tx_hang_recheck = false; +- netif_start_queue(netdev); + + hw->mac.get_link_status = true; + pm_runtime_put(&pdev->dev); +@@ -5226,6 +5226,7 @@ static void e1000_watchdog_task(struct w + if (phy->ops.cfg_on_link_up) + phy->ops.cfg_on_link_up(hw); + ++ netif_wake_queue(netdev); + netif_carrier_on(netdev); + + if (!test_bit(__E1000_DOWN, &adapter->state)) +@@ -5239,6 +5240,7 @@ static void e1000_watchdog_task(struct w + /* Link status message must follow this format */ + pr_info("%s NIC Link is Down\n", adapter->netdev->name); + netif_carrier_off(netdev); ++ netif_stop_queue(netdev); + if (!test_bit(__E1000_DOWN, &adapter->state)) + mod_timer(&adapter->phy_info_timer, + round_jiffies(jiffies + 2 * HZ)); diff --git a/queue-4.4/series b/queue-4.4/series index d55744def8f..8957148a9ec 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -25,3 +25,4 @@ staging-comedi-amplc_pci230-fix-null-pointer-deref-on-interrupt.patch carl9170-fix-misuse-of-device-driver-api.patch vmci-fix-integer-overflow-in-vmci-handle-arrays.patch mips-remove-superfluous-check-for-__linux__.patch +e1000e-start-network-tx-queue-only-when-link-is-up.patch diff --git a/queue-4.9/series b/queue-4.9/series index 072de65ce76..853273a5bcc 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -37,3 +37,5 @@ staging-comedi-amplc_pci230-fix-null-pointer-deref-on-interrupt.patch carl9170-fix-misuse-of-device-driver-api.patch vmci-fix-integer-overflow-in-vmci-handle-arrays.patch mips-remove-superfluous-check-for-__linux__.patch +revert-e1000e-fix-cyclic-resets-at-link-up-with-active-tx.patch +e1000e-start-network-tx-queue-only-when-link-is-up.patch diff --git a/queue-5.1/series b/queue-5.1/series new file mode 100644 index 00000000000..1bd1db664ba --- /dev/null +++ b/queue-5.1/series @@ -0,0 +1,2 @@ +revert-e1000e-fix-cyclic-resets-at-link-up-with-active-tx.patch +e1000e-start-network-tx-queue-only-when-link-is-up.patch diff --git a/queue-5.2/series b/queue-5.2/series new file mode 100644 index 00000000000..1bd1db664ba --- /dev/null +++ b/queue-5.2/series @@ -0,0 +1,2 @@ +revert-e1000e-fix-cyclic-resets-at-link-up-with-active-tx.patch +e1000e-start-network-tx-queue-only-when-link-is-up.patch -- 2.47.2