]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jan 2022 14:44:03 +0000 (15:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jan 2022 14:44:03 +0000 (15:44 +0100)
added patches:
i40e-fix-unsigned-stat-widths.patch
i40e-increase-delay-to-1-s-after-global-emp-reset.patch

queue-4.14/i40e-fix-unsigned-stat-widths.patch [new file with mode: 0644]
queue-4.14/i40e-increase-delay-to-1-s-after-global-emp-reset.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/i40e-fix-unsigned-stat-widths.patch b/queue-4.14/i40e-fix-unsigned-stat-widths.patch
new file mode 100644 (file)
index 0000000..58de3f1
--- /dev/null
@@ -0,0 +1,70 @@
+From 3b8428b84539c78fdc8006c17ebd25afd4722d51 Mon Sep 17 00:00:00 2001
+From: Joe Damato <jdamato@fastly.com>
+Date: Wed, 8 Dec 2021 17:56:33 -0800
+Subject: i40e: fix unsigned stat widths
+
+From: Joe Damato <jdamato@fastly.com>
+
+commit 3b8428b84539c78fdc8006c17ebd25afd4722d51 upstream.
+
+Change i40e_update_vsi_stats and struct i40e_vsi to use u64 fields to match
+the width of the stats counters in struct i40e_rx_queue_stats.
+
+Update debugfs code to use the correct format specifier for u64.
+
+Fixes: 41c445ff0f48 ("i40e: main driver core")
+Signed-off-by: Joe Damato <jdamato@fastly.com>
+Reported-by: kernel test robot <lkp@intel.com>
+Tested-by: Gurucharan G <gurucharanx.g@intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/i40e/i40e.h         |    8 ++++----
+ drivers/net/ethernet/intel/i40e/i40e_debugfs.c |    2 +-
+ drivers/net/ethernet/intel/i40e/i40e_main.c    |    4 ++--
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/ethernet/intel/i40e/i40e.h
++++ b/drivers/net/ethernet/intel/i40e/i40e.h
+@@ -627,12 +627,12 @@ struct i40e_vsi {
+       struct rtnl_link_stats64 net_stats_offsets;
+       struct i40e_eth_stats eth_stats;
+       struct i40e_eth_stats eth_stats_offsets;
+-      u32 tx_restart;
+-      u32 tx_busy;
++      u64 tx_restart;
++      u64 tx_busy;
+       u64 tx_linearize;
+       u64 tx_force_wb;
+-      u32 rx_buf_failed;
+-      u32 rx_page_failed;
++      u64 rx_buf_failed;
++      u64 rx_page_failed;
+       /* These are containers of ring pointers, allocated at run-time */
+       struct i40e_ring **rx_rings;
+--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
++++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+@@ -259,7 +259,7 @@ static void i40e_dbg_dump_vsi_seid(struc
+                (unsigned long int)vsi->net_stats_offsets.rx_compressed,
+                (unsigned long int)vsi->net_stats_offsets.tx_compressed);
+       dev_info(&pf->pdev->dev,
+-               "    tx_restart = %d, tx_busy = %d, rx_buf_failed = %d, rx_page_failed = %d\n",
++               "    tx_restart = %llu, tx_busy = %llu, rx_buf_failed = %llu, rx_page_failed = %llu\n",
+                vsi->tx_restart, vsi->tx_busy,
+                vsi->rx_buf_failed, vsi->rx_page_failed);
+       rcu_read_lock();
+--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
++++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
+@@ -778,9 +778,9 @@ static void i40e_update_vsi_stats(struct
+       struct rtnl_link_stats64 *ns;   /* netdev stats */
+       struct i40e_eth_stats *oes;
+       struct i40e_eth_stats *es;     /* device's eth stats */
+-      u32 tx_restart, tx_busy;
++      u64 tx_restart, tx_busy;
+       struct i40e_ring *p;
+-      u32 rx_page, rx_buf;
++      u64 rx_page, rx_buf;
+       u64 bytes, packets;
+       unsigned int start;
+       u64 tx_linearize;
diff --git a/queue-4.14/i40e-increase-delay-to-1-s-after-global-emp-reset.patch b/queue-4.14/i40e-increase-delay-to-1-s-after-global-emp-reset.patch
new file mode 100644 (file)
index 0000000..4a48971
--- /dev/null
@@ -0,0 +1,47 @@
+From 9b13bd53134c9ddd544a790125199fdbdb505e67 Mon Sep 17 00:00:00 2001
+From: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
+Date: Thu, 28 Oct 2021 13:51:14 +0000
+Subject: i40e: Increase delay to 1 s after global EMP reset
+
+From: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
+
+commit 9b13bd53134c9ddd544a790125199fdbdb505e67 upstream.
+
+Recently simplified i40e_rebuild causes that FW sometimes
+is not ready after NVM update, the ping does not return.
+
+Increase the delay in case of EMP reset.
+Old delay of 300 ms was introduced for specific cards for 710 series.
+Now it works for all the cards and delay was increased.
+
+Fixes: 1fa51a650e1d ("i40e: Add delay after EMP reset for firmware to recover")
+Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
+Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
+Tested-by: Gurucharan G <gurucharanx.g@intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/i40e/i40e_main.c |   12 +++---------
+ 1 file changed, 3 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
++++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
+@@ -7245,15 +7245,9 @@ static void i40e_rebuild(struct i40e_pf
+       }
+       i40e_get_oem_version(&pf->hw);
+-      if (test_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state) &&
+-          ((hw->aq.fw_maj_ver == 4 && hw->aq.fw_min_ver <= 33) ||
+-           hw->aq.fw_maj_ver < 4) && hw->mac.type == I40E_MAC_XL710) {
+-              /* The following delay is necessary for 4.33 firmware and older
+-               * to recover after EMP reset. 200 ms should suffice but we
+-               * put here 300 ms to be sure that FW is ready to operate
+-               * after reset.
+-               */
+-              mdelay(300);
++      if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state)) {
++              /* The following delay is necessary for firmware update. */
++              mdelay(1000);
+       }
+       /* re-verify the eeprom if we just had an EMP reset */
index 0643e79c510b52b33f9c0436a780c50a7e0ad67c..df6f5885f208103f9022290b66752ee2e81219e6 100644 (file)
@@ -16,3 +16,5 @@ usb-typec-tcpm-do-not-disconnect-while-receiving-vbus-off.patch
 net-sfp-ignore-disabled-sfp-node.patch
 powerpc-32-fix-boot-failure-with-gcc-latent-entropy-plugin.patch
 lkdtm-fix-content-of-section-containing-lkdtm_rodata_do_nothing.patch
+i40e-increase-delay-to-1-s-after-global-emp-reset.patch
+i40e-fix-unsigned-stat-widths.patch