Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2018-12-07 14:52:20 +0100
committerPetr Tesarik <ptesarik@suse.cz>2018-12-07 14:52:20 +0100
commitfd373a4014ef80f73275000e987fa4dcc221b9aa (patch)
treead21c905000f43d046182a52f34d61115bdaa9c9
parent3949c4ac5b073ff5c356156dad8c4c723592d9fc (diff)
parent97288a2b5de8709712cd395f5e6c733a295bfe58 (diff)
Merge branch 'users/tbogendoerfer/SLE15-SP1/for-next' into SLE15-SP1rpm-4.12.14-25.23--SLE-15-SP1-Packages-Beta1rpm-4.12.14-25.23
Pull igb/igbvf driver update from Thomas Bogendoerfer
-rw-r--r--patches.drivers/igb-Only-call-skb_tx_timestamp-after-descriptors-are.patch42
-rw-r--r--patches.drivers/igb-Only-change-Tx-arbitration-when-CBS-is-on.patch121
-rw-r--r--patches.drivers/igb-Refactor-igb_configure_cbs.patch164
-rw-r--r--patches.drivers/igb-Refactor-igb_offload_cbs.patch56
-rw-r--r--patches.drivers/igb-Remove-superfluous-reset-to-PHY-and-page-0-selec.patch84
-rw-r--r--patches.drivers/igb-Remove-unnecessary-include-of-linux-pci-aspm.h.patch29
-rw-r--r--patches.drivers/igb-Replace-GFP_ATOMIC-with-GFP_KERNEL-in-igb_sw_ini.patch44
-rw-r--r--patches.drivers/igb-Replace-mdelay-with-msleep-in-igb_integrated_phy.patch32
-rw-r--r--patches.drivers/igb-Use-dma_wmb-instead-of-wmb-before-doorbell-write.patch43
-rw-r--r--patches.drivers/igb-e1000_82575-Mark-expected-switch-fall-through.patch28
-rw-r--r--patches.drivers/igb-e1000_phy-Mark-expected-switch-fall-through.patch28
-rw-r--r--patches.drivers/igb-fix-uninitialized-variables.patch27
-rw-r--r--patches.drivers/igb-remove-ndo_poll_controller.patch78
-rw-r--r--patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval-4c9b658e.patch55
-rw-r--r--patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval.patch49
-rw-r--r--patches.drivers/igb_main-Mark-expected-switch-fall-throughs.patch37
-rw-r--r--patches.drivers/igbvf-netdev-Mark-expected-switch-fall-through.patch28
-rw-r--r--series.conf17
18 files changed, 962 insertions, 0 deletions
diff --git a/patches.drivers/igb-Only-call-skb_tx_timestamp-after-descriptors-are.patch b/patches.drivers/igb-Only-call-skb_tx_timestamp-after-descriptors-are.patch
new file mode 100644
index 0000000000..2455a92d9a
--- /dev/null
+++ b/patches.drivers/igb-Only-call-skb_tx_timestamp-after-descriptors-are.patch
@@ -0,0 +1,42 @@
+From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Date: Tue, 3 Jul 2018 15:42:58 -0700
+Subject: igb: Only call skb_tx_timestamp after descriptors are ready
+Patch-mainline: v4.19-rc1
+Git-commit: 1b9231e7e148520a3ba63a604b27f11093f21bee
+References: bsc#1117495
+
+Currently, skb_tx_timestamp() is being called before the Tx
+descriptors are prepared in igb_xmit_frame_ring(), which happens
+during either the igb_tso() or igb_tx_csum() calls.
+
+Given that now the skb->tstamp might be used to carry the timestamp
+for SO_TXTIME, we must only call skb_tx_timestamp() after the
+information has been copied into the Tx descriptors.
+
+Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -6054,8 +6054,6 @@ netdev_tx_t igb_xmit_frame_ring(struct s
+ }
+ }
+
+- skb_tx_timestamp(skb);
+-
+ if (skb_vlan_tag_present(skb)) {
+ tx_flags |= IGB_TX_FLAGS_VLAN;
+ tx_flags |= (skb_vlan_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
+@@ -6071,6 +6069,8 @@ netdev_tx_t igb_xmit_frame_ring(struct s
+ else if (!tso)
+ igb_tx_csum(tx_ring, first);
+
++ skb_tx_timestamp(skb);
++
+ if (igb_tx_map(tx_ring, first, hdr_len))
+ goto cleanup_tx_tstamp;
+
diff --git a/patches.drivers/igb-Only-change-Tx-arbitration-when-CBS-is-on.patch b/patches.drivers/igb-Only-change-Tx-arbitration-when-CBS-is-on.patch
new file mode 100644
index 0000000000..250ed15f97
--- /dev/null
+++ b/patches.drivers/igb-Only-change-Tx-arbitration-when-CBS-is-on.patch
@@ -0,0 +1,121 @@
+From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Date: Tue, 3 Jul 2018 15:42:56 -0700
+Subject: igb: Only change Tx arbitration when CBS is on
+Patch-mainline: v4.19-rc1
+Git-commit: 0364a0d0e7a124e7c821cc536a95f7ef421349cb
+References: bsc#1117495
+
+Currently the data transmission arbitration algorithm - DataTranARB
+field on TQAVCTRL reg - is always set to CBS when the Tx mode is
+changed from legacy to 'Qav' mode.
+
+Make that configuration a bit more granular in preparation for the
+upcoming Launchtime enabling patches, since CBS and Launchtime can be
+enabled separately. That is achieved by moving the DataTranARB setup
+to igb_config_tx_modes() instead.
+
+Similarly, when disabling CBS we must check if it has been disabled
+for all queues, and clear the DataTranARB accordingly.
+
+Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 49 ++++++++++++++++++++----------
+ 1 file changed, 33 insertions(+), 16 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -1674,6 +1674,18 @@ static void set_queue_mode(struct e1000_
+ wr32(E1000_I210_TQAVCC(queue), val);
+ }
+
++static bool is_any_cbs_enabled(struct igb_adapter *adapter)
++{
++ int i;
++
++ for (i = 0; i < adapter->num_tx_queues; i++) {
++ if (adapter->tx_ring[i]->cbs_enable)
++ return true;
++ }
++
++ return false;
++}
++
+ /**
+ * igb_config_tx_modes - Configure "Qav Tx mode" features on igb
+ * @adapter: pointer to adapter struct
+@@ -1688,7 +1700,7 @@ static void igb_config_tx_modes(struct i
+ struct igb_ring *ring = adapter->tx_ring[queue];
+ struct net_device *netdev = adapter->netdev;
+ struct e1000_hw *hw = &adapter->hw;
+- u32 tqavcc;
++ u32 tqavcc, tqavctrl;
+ u16 value;
+
+ WARN_ON(hw->mac.type != e1000_i210);
+@@ -1713,6 +1725,14 @@ static void igb_config_tx_modes(struct i
+ set_tx_desc_fetch_prio(hw, queue, TX_QUEUE_PRIO_HIGH);
+ set_queue_mode(hw, queue, QUEUE_MODE_STREAM_RESERVATION);
+
++ /* Always set data transfer arbitration to credit-based
++ * shaper algorithm on TQAVCTRL if CBS is enabled for any of
++ * the queues.
++ */
++ tqavctrl = rd32(E1000_I210_TQAVCTRL);
++ tqavctrl |= E1000_TQAVCTRL_DATATRANARB;
++ wr32(E1000_I210_TQAVCTRL, tqavctrl);
++
+ /* According to i210 datasheet section 7.2.7.7, we should set
+ * the 'idleSlope' field from TQAVCC register following the
+ * equation:
+@@ -1790,6 +1810,16 @@ static void igb_config_tx_modes(struct i
+
+ /* Set hiCredit to zero. */
+ wr32(E1000_I210_TQAVHC(queue), 0);
++
++ /* If CBS is not enabled for any queues anymore, then return to
++ * the default state of Data Transmission Arbitration on
++ * TQAVCTRL.
++ */
++ if (!is_any_cbs_enabled(adapter)) {
++ tqavctrl = rd32(E1000_I210_TQAVCTRL);
++ tqavctrl &= ~E1000_TQAVCTRL_DATATRANARB;
++ wr32(E1000_I210_TQAVCTRL, tqavctrl);
++ }
+ }
+
+ /* XXX: In i210 controller the sendSlope and loCredit parameters from
+@@ -1823,18 +1853,6 @@ static int igb_save_cbs_params(struct ig
+ return 0;
+ }
+
+-static bool is_any_cbs_enabled(struct igb_adapter *adapter)
+-{
+- int i;
+-
+- for (i = 0; i < adapter->num_tx_queues; i++) {
+- if (adapter->tx_ring[i]->cbs_enable)
+- return true;
+- }
+-
+- return false;
+-}
+-
+ /**
+ * igb_setup_tx_mode - Switch to/from Qav Tx mode when applicable
+ * @adapter: pointer to adapter struct
+@@ -1858,11 +1876,10 @@ static void igb_setup_tx_mode(struct igb
+ int i, max_queue;
+
+ /* Configure TQAVCTRL register: set transmit mode to 'Qav',
+- * set data fetch arbitration to 'round robin' and set data
+- * transfer arbitration to 'credit shaper algorithm.
++ * set data fetch arbitration to 'round robin'.
+ */
+ val = rd32(E1000_I210_TQAVCTRL);
+- val |= E1000_TQAVCTRL_XMIT_MODE | E1000_TQAVCTRL_DATATRANARB;
++ val |= E1000_TQAVCTRL_XMIT_MODE;
+ val &= ~E1000_TQAVCTRL_DATAFETCHARB;
+ wr32(E1000_I210_TQAVCTRL, val);
+
diff --git a/patches.drivers/igb-Refactor-igb_configure_cbs.patch b/patches.drivers/igb-Refactor-igb_configure_cbs.patch
new file mode 100644
index 0000000000..cc03d5b9b0
--- /dev/null
+++ b/patches.drivers/igb-Refactor-igb_configure_cbs.patch
@@ -0,0 +1,164 @@
+From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Date: Tue, 3 Jul 2018 15:42:55 -0700
+Subject: igb: Refactor igb_configure_cbs()
+Patch-mainline: v4.19-rc1
+Git-commit: 91db364236c8ae1af976d9794e5fec98e859dae7
+References: bsc#1117495
+
+Make this function retrieve what it needs from the Tx ring being
+addressed since it already relies on what had been saved on it before.
+Also, since this function will be used by the upcoming Launchtime
+patches rename it to better reflect its intention. Note that
+Launchtime is not part of what 802.1Qav specifies, but the i210
+datasheet refers to this set of functionality as "Qav Transmission
+Mode".
+
+Here we also perform a tiny refactor at is_any_cbs_enabled(), and add
+further documentation to igb_setup_tx_mode().
+
+Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 60 ++++++++++++++----------------
+ 1 file changed, 28 insertions(+), 32 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -1675,23 +1675,17 @@ static void set_queue_mode(struct e1000_
+ }
+
+ /**
+- * igb_configure_cbs - Configure Credit-Based Shaper (CBS)
++ * igb_config_tx_modes - Configure "Qav Tx mode" features on igb
+ * @adapter: pointer to adapter struct
+ * @queue: queue number
+- * @enable: true = enable CBS, false = disable CBS
+- * @idleslope: idleSlope in kbps
+- * @sendslope: sendSlope in kbps
+- * @hicredit: hiCredit in bytes
+- * @locredit: loCredit in bytes
+ *
+- * Configure CBS for a given hardware queue. When disabling, idleslope,
+- * sendslope, hicredit, locredit arguments are ignored. Returns 0 if
+- * success. Negative otherwise.
++ * Configure CBS for a given hardware queue. Parameters are retrieved
++ * from the correct Tx ring, so igb_save_cbs_params() should be used
++ * for setting those correctly prior to this function being called.
+ **/
+-static void igb_configure_cbs(struct igb_adapter *adapter, int queue,
+- bool enable, int idleslope, int sendslope,
+- int hicredit, int locredit)
++static void igb_config_tx_modes(struct igb_adapter *adapter, int queue)
+ {
++ struct igb_ring *ring = adapter->tx_ring[queue];
+ struct net_device *netdev = adapter->netdev;
+ struct e1000_hw *hw = &adapter->hw;
+ u32 tqavcc;
+@@ -1700,7 +1694,7 @@ static void igb_configure_cbs(struct igb
+ WARN_ON(hw->mac.type != e1000_i210);
+ WARN_ON(queue < 0 || queue > 1);
+
+- if (enable || queue == 0) {
++ if (ring->cbs_enable || queue == 0) {
+ /* i210 does not allow the queue 0 to be in the Strict
+ * Priority mode while the Qav mode is enabled, so,
+ * instead of disabling strict priority mode, we give
+@@ -1710,10 +1704,10 @@ static void igb_configure_cbs(struct igb
+ * Queue0 QueueMode must be set to 1b when
+ * TransmitMode is set to Qav."
+ */
+- if (queue == 0 && !enable) {
++ if (queue == 0 && !ring->cbs_enable) {
+ /* max "linkspeed" idleslope in kbps */
+- idleslope = 1000000;
+- hicredit = ETH_FRAME_LEN;
++ ring->idleslope = 1000000;
++ ring->hicredit = ETH_FRAME_LEN;
+ }
+
+ set_tx_desc_fetch_prio(hw, queue, TX_QUEUE_PRIO_HIGH);
+@@ -1776,14 +1770,15 @@ static void igb_configure_cbs(struct igb
+ * calculated value, so the resulting bandwidth might
+ * be slightly higher for some configurations.
+ */
+- value = DIV_ROUND_UP_ULL(idleslope * 61034ULL, 1000000);
++ value = DIV_ROUND_UP_ULL(ring->idleslope * 61034ULL, 1000000);
+
+ tqavcc = rd32(E1000_I210_TQAVCC(queue));
+ tqavcc &= ~E1000_TQAVCC_IDLESLOPE_MASK;
+ tqavcc |= value;
+ wr32(E1000_I210_TQAVCC(queue), tqavcc);
+
+- wr32(E1000_I210_TQAVHC(queue), 0x80000000 + hicredit * 0x7735);
++ wr32(E1000_I210_TQAVHC(queue),
++ 0x80000000 + ring->hicredit * 0x7735);
+ } else {
+ set_tx_desc_fetch_prio(hw, queue, TX_QUEUE_PRIO_LOW);
+ set_queue_mode(hw, queue, QUEUE_MODE_STRICT_PRIORITY);
+@@ -1803,8 +1798,9 @@ static void igb_configure_cbs(struct igb
+ */
+
+ netdev_dbg(netdev, "CBS %s: queue %d idleslope %d sendslope %d hiCredit %d locredit %d\n",
+- (enable) ? "enabled" : "disabled", queue,
+- idleslope, sendslope, hicredit, locredit);
++ (ring->cbs_enable) ? "enabled" : "disabled", queue,
++ ring->idleslope, ring->sendslope, ring->hicredit,
++ ring->locredit);
+ }
+
+ static int igb_save_cbs_params(struct igb_adapter *adapter, int queue,
+@@ -1829,19 +1825,25 @@ static int igb_save_cbs_params(struct ig
+
+ static bool is_any_cbs_enabled(struct igb_adapter *adapter)
+ {
+- struct igb_ring *ring;
+ int i;
+
+ for (i = 0; i < adapter->num_tx_queues; i++) {
+- ring = adapter->tx_ring[i];
+-
+- if (ring->cbs_enable)
++ if (adapter->tx_ring[i]->cbs_enable)
+ return true;
+ }
+
+ return false;
+ }
+
++/**
++ * igb_setup_tx_mode - Switch to/from Qav Tx mode when applicable
++ * @adapter: pointer to adapter struct
++ *
++ * Configure TQAVCTRL register switching the controller's Tx mode
++ * if FQTSS mode is enabled or disabled. Additionally, will issue
++ * a call to igb_config_tx_modes() per queue so any previously saved
++ * Tx parameters are applied.
++ **/
+ static void igb_setup_tx_mode(struct igb_adapter *adapter)
+ {
+ struct net_device *netdev = adapter->netdev;
+@@ -1901,11 +1903,7 @@ static void igb_setup_tx_mode(struct igb
+ adapter->num_tx_queues : I210_SR_QUEUES_NUM;
+
+ for (i = 0; i < max_queue; i++) {
+- struct igb_ring *ring = adapter->tx_ring[i];
+-
+- igb_configure_cbs(adapter, i, ring->cbs_enable,
+- ring->idleslope, ring->sendslope,
+- ring->hicredit, ring->locredit);
++ igb_config_tx_modes(adapter, i);
+ }
+ } else {
+ wr32(E1000_RXPBS, I210_RXPBSIZE_DEFAULT);
+@@ -2500,9 +2498,7 @@ static int igb_offload_cbs(struct igb_ad
+ return err;
+
+ if (is_fqtss_enabled(adapter)) {
+- igb_configure_cbs(adapter, qopt->queue, qopt->enable,
+- qopt->idleslope, qopt->sendslope,
+- qopt->hicredit, qopt->locredit);
++ igb_config_tx_modes(adapter, qopt->queue);
+
+ if (!is_any_cbs_enabled(adapter))
+ enable_fqtss(adapter, false);
diff --git a/patches.drivers/igb-Refactor-igb_offload_cbs.patch b/patches.drivers/igb-Refactor-igb_offload_cbs.patch
new file mode 100644
index 0000000000..c558dc1f95
--- /dev/null
+++ b/patches.drivers/igb-Refactor-igb_offload_cbs.patch
@@ -0,0 +1,56 @@
+From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Date: Tue, 3 Jul 2018 15:42:57 -0700
+Subject: igb: Refactor igb_offload_cbs()
+Patch-mainline: v4.19-rc1
+Git-commit: 8080e6ab4e99216f414c5c314264fd7cf3b6e4c1
+References: bsc#1117495
+
+Split code into a separate function (igb_offload_apply()) that will be
+used by ETF offload implementation.
+
+Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 23 ++++++++++++++---------
+ 1 file changed, 14 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -2494,6 +2494,19 @@ igb_features_check(struct sk_buff *skb,
+ return features;
+ }
+
++static void igb_offload_apply(struct igb_adapter *adapter, s32 queue)
++{
++ if (!is_fqtss_enabled(adapter)) {
++ enable_fqtss(adapter, true);
++ return;
++ }
++
++ igb_config_tx_modes(adapter, queue);
++
++ if (!is_any_cbs_enabled(adapter))
++ enable_fqtss(adapter, false);
++}
++
+ static int igb_offload_cbs(struct igb_adapter *adapter,
+ struct tc_cbs_qopt_offload *qopt)
+ {
+@@ -2514,15 +2527,7 @@ static int igb_offload_cbs(struct igb_ad
+ if (err)
+ return err;
+
+- if (is_fqtss_enabled(adapter)) {
+- igb_config_tx_modes(adapter, qopt->queue);
+-
+- if (!is_any_cbs_enabled(adapter))
+- enable_fqtss(adapter, false);
+-
+- } else {
+- enable_fqtss(adapter, true);
+- }
++ igb_offload_apply(adapter, qopt->queue);
+
+ return 0;
+ }
diff --git a/patches.drivers/igb-Remove-superfluous-reset-to-PHY-and-page-0-selec.patch b/patches.drivers/igb-Remove-superfluous-reset-to-PHY-and-page-0-selec.patch
new file mode 100644
index 0000000000..b2a70a5e50
--- /dev/null
+++ b/patches.drivers/igb-Remove-superfluous-reset-to-PHY-and-page-0-selec.patch
@@ -0,0 +1,84 @@
+From: =?UTF-8?q?Christian=20Gr=C3=B6nke?= <c.groenke@infodas.de>
+Date: Tue, 26 Jun 2018 10:12:18 +0000
+Subject: igb: Remove superfluous reset to PHY and page 0 selection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Patch-mainline: v4.19-rc1
+Git-commit: 2a83fba6cae89dd9c0625e68ff8ffff791c67ac0
+References: bsc#1117495
+
+This patch reverts two previous applied patches to fix an issue
+that appeared when using SGMII based SFP modules. In the current
+state the driver will try to reset the PHY before obtaining the
+phy_addr of the SGMII attached PHY. That leads to an error in
+e1000_write_phy_reg_sgmii_82575. Causing the initialization to
+fail:
+
+ igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
+ igb: Copyright (c) 2007-2014 Intel Corporation.
+ igb: probe of ????:??:??.? failed with error -3
+
+The patches being reverted are:
+
+ commit 182785335447957409282ca745aa5bc3968facee
+ Author: Aaron Sierra <asierra@xes-inc.com>
+ Date: Tue Nov 29 10:03:56 2016 -0600
+
+ igb: reset the PHY before reading the PHY ID
+
+ commit 440aeca4b9858248d8f16d724d9fa87a4f65fa33
+ Author: Matwey V Kornilov <matwey@sai.msu.ru>
+ Date: Thu Nov 24 13:32:48 2016 +0300
+
+ igb: Explicitly select page 0 at initialization
+
+The first reverted patch directly causes the problem mentioned above.
+In case of SGMII the phy_addr is not known at this point and will
+only be obtained by 'igb_get_phy_id_82575' further down in the code.
+The second removed patch selects forces selection of page 0 in the
+PHY. Something that the reset tries to address as well.
+
+As pointed out by Alexander Duzck, the patch below fixes the same
+issue but in the proper location:
+
+ commit 4e684f59d760a2c7c716bb60190783546e2d08a1
+ Author: Chris J Arges <christopherarges@gmail.com>
+ Date: Wed Nov 2 09:13:42 2016 -0500
+
+ igb: Workaround for igb i210 firmware issue
+
+Reverts: 440aeca4b9858248d8f16d724d9fa87a4f65fa33.
+Reverts: 182785335447957409282ca745aa5bc3968facee.
+
+Signed-off-by: Christian Grönke <c.groenke@infodas.de>
+Reviewed-by: Alexander Duyck <alexander.h.duyck@intel.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/e1000_82575.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
++++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
+@@ -245,19 +245,7 @@ static s32 igb_init_phy_params_82575(str
+ hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
+ E1000_STATUS_FUNC_SHIFT;
+
+- /* Make sure the PHY is in a good state. Several people have reported
+- * firmware leaving the PHY's page select register set to something
+- * other than the default of zero, which causes the PHY ID read to
+- * access something other than the intended register.
+- */
+- ret_val = hw->phy.ops.reset(hw);
+- if (ret_val) {
+- hw_dbg("Error resetting the PHY.\n");
+- goto out;
+- }
+-
+ /* Set phy->phy_addr and phy->id. */
+- igb_write_phy_reg_82580(hw, I347AT4_PAGE_SELECT, 0);
+ ret_val = igb_get_phy_id_82575(hw);
+ if (ret_val)
+ return ret_val;
diff --git a/patches.drivers/igb-Remove-unnecessary-include-of-linux-pci-aspm.h.patch b/patches.drivers/igb-Remove-unnecessary-include-of-linux-pci-aspm.h.patch
new file mode 100644
index 0000000000..ae406b64b1
--- /dev/null
+++ b/patches.drivers/igb-Remove-unnecessary-include-of-linux-pci-aspm.h.patch
@@ -0,0 +1,29 @@
+From: Bjorn Helgaas <bhelgaas@google.com>
+Date: Wed, 25 Jul 2018 14:53:40 -0500
+Subject: igb: Remove unnecessary include of <linux/pci-aspm.h>
+Patch-mainline: v4.19-rc1
+Git-commit: f5ddcf71e66eac681500ab94df0f9e33c4f2b4a7
+References: bsc#1117495
+
+The igb driver doesn't need anything provided by pci-aspm.h, so remove
+the unnecessary include of it.
+
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Reviewed-by: Sinan Kaya <okaya@kernel.org>
+Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
+Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -42,7 +42,6 @@
+ #include <linux/if.h>
+ #include <linux/if_vlan.h>
+ #include <linux/pci.h>
+-#include <linux/pci-aspm.h>
+ #include <linux/delay.h>
+ #include <linux/interrupt.h>
+ #include <linux/ip.h>
diff --git a/patches.drivers/igb-Replace-GFP_ATOMIC-with-GFP_KERNEL-in-igb_sw_ini.patch b/patches.drivers/igb-Replace-GFP_ATOMIC-with-GFP_KERNEL-in-igb_sw_ini.patch
new file mode 100644
index 0000000000..a12c3150f4
--- /dev/null
+++ b/patches.drivers/igb-Replace-GFP_ATOMIC-with-GFP_KERNEL-in-igb_sw_ini.patch
@@ -0,0 +1,44 @@
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+Date: Fri, 27 Jul 2018 16:04:53 +0800
+Subject: igb: Replace GFP_ATOMIC with GFP_KERNEL in igb_sw_init()
+Patch-mainline: v4.19-rc2
+Git-commit: 151356270b0761e455ed82bba3353fb494451555
+References: bsc#1117495
+
+igb_sw_init() is never called in atomic context.
+It calls kzalloc() and kcalloc() with GFP_ATOMIC, which is not necessary.
+GFP_ATOMIC can be replaced with GFP_KERNEL.
+
+This is found by a static analysis tool named DCNS written by myself.
+
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -3802,8 +3802,9 @@ static int igb_sw_init(struct igb_adapte
+ /* Assume MSI-X interrupts, will be checked during IRQ allocation */
+ adapter->flags |= IGB_FLAG_HAS_MSIX;
+
+- adapter->mac_table = kzalloc(sizeof(struct igb_mac_addr) *
+- hw->mac.rar_entry_count, GFP_ATOMIC);
++ adapter->mac_table = kcalloc(hw->mac.rar_entry_count,
++ sizeof(struct igb_mac_addr),
++ GFP_KERNEL);
+ if (!adapter->mac_table)
+ return -ENOMEM;
+
+@@ -3813,7 +3814,7 @@ static int igb_sw_init(struct igb_adapte
+
+ /* Setup and initialize a copy of the hw vlan table array */
+ adapter->shadow_vfta = kcalloc(E1000_VLAN_FILTER_TBL_SIZE, sizeof(u32),
+- GFP_ATOMIC);
++ GFP_KERNEL);
+ if (!adapter->shadow_vfta)
+ return -ENOMEM;
+
diff --git a/patches.drivers/igb-Replace-mdelay-with-msleep-in-igb_integrated_phy.patch b/patches.drivers/igb-Replace-mdelay-with-msleep-in-igb_integrated_phy.patch
new file mode 100644
index 0000000000..fee3042dd1
--- /dev/null
+++ b/patches.drivers/igb-Replace-mdelay-with-msleep-in-igb_integrated_phy.patch
@@ -0,0 +1,32 @@
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+Date: Fri, 27 Jul 2018 16:07:38 +0800
+Subject: igb: Replace mdelay() with msleep() in igb_integrated_phy_loopback()
+Patch-mainline: v4.19-rc2
+Git-commit: 69a64658de502c8ca383fe2c5a5208f00b5844cd
+References: bsc#1117495
+
+igb_integrated_phy_loopback() is never called in atomic context.
+It calls mdelay() to busily wait, which is not necessary.
+mdelay() can be replaced with msleep().
+
+This is found by a static analysis tool named DCNS written by myself.
+
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+@@ -1669,7 +1669,7 @@ static int igb_integrated_phy_loopback(s
+ if (hw->phy.type == e1000_phy_m88)
+ igb_phy_disable_receiver(adapter);
+
+- mdelay(500);
++ msleep(500);
+ return 0;
+ }
+
diff --git a/patches.drivers/igb-Use-dma_wmb-instead-of-wmb-before-doorbell-write.patch b/patches.drivers/igb-Use-dma_wmb-instead-of-wmb-before-doorbell-write.patch
new file mode 100644
index 0000000000..d33a461b15
--- /dev/null
+++ b/patches.drivers/igb-Use-dma_wmb-instead-of-wmb-before-doorbell-write.patch
@@ -0,0 +1,43 @@
+From: Venkatesh Srinivas <venkateshs@google.com>
+Date: Fri, 25 May 2018 00:13:21 -0400
+Subject: igb: Use dma_wmb() instead of wmb() before doorbell writes
+Patch-mainline: v4.19-rc1
+Git-commit: 73017f4e051c86985cf4647eceee34de7c13b1b1
+References: bsc#1117495
+
+igb writes to doorbells to post transmit and receive descriptors;
+after writing descriptors to memory but before writing to doorbells,
+use dma_wmb() rather than wmb(). wmb() is more heavyweight than
+necessary before doorbell writes.
+
+On x86, this avoids SFENCEs before doorbell writes in both the
+tx and rx refill paths.
+
+Signed-off-by: Venkatesh Srinivas <venkateshs@google.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -5948,7 +5948,7 @@ static int igb_tx_map(struct igb_ring *t
+ * We also need this memory barrier to make certain all of the
+ * status bits have been updated before next_to_watch is written.
+ */
+- wmb();
++ dma_wmb();
+
+ /* set next_to_watch value indicating a packet is present */
+ first->next_to_watch = tx_desc;
+@@ -8448,7 +8448,7 @@ void igb_alloc_rx_buffers(struct igb_rin
+ * applicable for weak-ordered memory model archs,
+ * such as IA-64).
+ */
+- wmb();
++ dma_wmb();
+ writel(i, rx_ring->tail);
+ }
+ }
diff --git a/patches.drivers/igb-e1000_82575-Mark-expected-switch-fall-through.patch b/patches.drivers/igb-e1000_82575-Mark-expected-switch-fall-through.patch
new file mode 100644
index 0000000000..2ddf07a0b7
--- /dev/null
+++ b/patches.drivers/igb-e1000_82575-Mark-expected-switch-fall-through.patch
@@ -0,0 +1,28 @@
+From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Date: Tue, 7 Aug 2018 18:22:57 -0500
+Subject: igb: e1000_82575: Mark expected switch fall-through
+Patch-mainline: v4.19-rc1
+Git-commit: b9e0e23f918bafddaaf3b91b099f027679a77467
+References: bsc#1117495
+
+In preparation to enabling -Wimplicit-fallthrough, mark switch cases
+where we are expecting to fall through.
+
+Addresses-Coverity-ID: 114799 ("Missing break in switch")
+Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/e1000_82575.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
++++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
+@@ -1728,6 +1728,7 @@ static s32 igb_setup_serdes_link_82575(s
+ case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX:
+ /* disable PCS autoneg and support parallel detect only */
+ pcs_autoneg = false;
++ /* fall through */
+ default:
+ if (hw->mac.type == e1000_82575 ||
+ hw->mac.type == e1000_82576) {
diff --git a/patches.drivers/igb-e1000_phy-Mark-expected-switch-fall-through.patch b/patches.drivers/igb-e1000_phy-Mark-expected-switch-fall-through.patch
new file mode 100644
index 0000000000..5f4da81f25
--- /dev/null
+++ b/patches.drivers/igb-e1000_phy-Mark-expected-switch-fall-through.patch
@@ -0,0 +1,28 @@
+From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Date: Tue, 7 Aug 2018 18:23:31 -0500
+Subject: igb: e1000_phy: Mark expected switch fall-through
+Patch-mainline: v4.19-rc1
+Git-commit: eed05a094a0dd03f181d3fd65e4be375d88a582c
+References: bsc#1117495
+
+In preparation to enabling -Wimplicit-fallthrough, mark switch cases
+where we are expecting to fall through.
+
+Addresses-Coverity-ID: 114800 ("Missing break in switch")
+Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/e1000_phy.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/intel/igb/e1000_phy.c
++++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
+@@ -679,6 +679,7 @@ s32 igb_copper_link_setup_m88_gen2(struc
+ phy_data |= M88E1000_PSCR_AUTO_X_1000T;
+ break;
+ }
++ /* fall through */
+ case 0:
+ default:
+ phy_data |= M88E1000_PSCR_AUTO_X_MODE;
diff --git a/patches.drivers/igb-fix-uninitialized-variables.patch b/patches.drivers/igb-fix-uninitialized-variables.patch
new file mode 100644
index 0000000000..13852eca86
--- /dev/null
+++ b/patches.drivers/igb-fix-uninitialized-variables.patch
@@ -0,0 +1,27 @@
+From: Yunjian Wang <wangyunjian@huawei.com>
+Date: Tue, 6 Nov 2018 16:27:12 +0800
+Subject: igb: fix uninitialized variables
+Patch-mainline: v4.20-rc5
+Git-commit: e4c39f7926b4de355f7df75651d75003806aae09
+References: bsc#1117495
+
+This patch fixes the variable 'phy_word' may be used uninitialized.
+
+Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/e1000_i210.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/intel/igb/e1000_i210.c
++++ b/drivers/net/ethernet/intel/igb/e1000_i210.c
+@@ -862,6 +862,7 @@ s32 igb_pll_workaround_i210(struct e1000
+ nvm_word = E1000_INVM_DEFAULT_AL;
+ tmp_nvm = nvm_word | E1000_INVM_PLL_WO_VAL;
+ igb_write_phy_reg_82580(hw, I347AT4_PAGE_SELECT, E1000_PHY_PLL_FREQ_PAGE);
++ phy_word = E1000_PHY_PLL_UNCONF;
+ for (i = 0; i < E1000_MAX_PLL_TRIES; i++) {
+ /* check current state directly from internal PHY */
+ igb_read_phy_reg_82580(hw, E1000_PHY_PLL_FREQ_REG, &phy_word);
diff --git a/patches.drivers/igb-remove-ndo_poll_controller.patch b/patches.drivers/igb-remove-ndo_poll_controller.patch
new file mode 100644
index 0000000000..0a2b5f3245
--- /dev/null
+++ b/patches.drivers/igb-remove-ndo_poll_controller.patch
@@ -0,0 +1,78 @@
+From: Eric Dumazet <edumazet@google.com>
+Date: Fri, 21 Sep 2018 15:27:44 -0700
+Subject: igb: remove ndo_poll_controller
+Patch-mainline: v4.19-rc6
+Git-commit: 0542997edece2d75e0bf3e173dfddf1b2b3ef756
+References: bsc#1117495
+
+As diagnosed by Song Liu, ndo_poll_controller() can
+be very dangerous on loaded hosts, since the cpu
+calling ndo_poll_controller() might steal all NAPI
+contexts (for all RX/TX queues of the NIC). This capture
+can last for unlimited amount of time, since one
+cpu is generally not able to drain all the queues under load.
+
+igb uses NAPI for TX completions, so we better let core
+networking stack call the napi->poll() to avoid the capture.
+
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 30 ------------------------------
+ 1 file changed, 30 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -225,10 +225,6 @@ static struct notifier_block dca_notifie
+ .priority = 0
+ };
+ #endif
+-#ifdef CONFIG_NET_POLL_CONTROLLER
+-/* for netdump / net console */
+-static void igb_netpoll(struct net_device *);
+-#endif
+ #ifdef CONFIG_PCI_IOV
+ static unsigned int max_vfs;
+ module_param(max_vfs, uint, 0);
+@@ -2810,9 +2806,6 @@ static const struct net_device_ops igb_n
+ .ndo_set_vf_spoofchk = igb_ndo_set_vf_spoofchk,
+ .ndo_set_vf_trust = igb_ndo_set_vf_trust,
+ .ndo_get_vf_config = igb_ndo_get_vf_config,
+-#ifdef CONFIG_NET_POLL_CONTROLLER
+- .ndo_poll_controller = igb_netpoll,
+-#endif
+ .ndo_fix_features = igb_fix_features,
+ .ndo_set_features = igb_set_features,
+ .ndo_fdb_add = igb_ndo_fdb_add,
+@@ -8970,29 +8963,6 @@ static int igb_pci_sriov_configure(struc
+ return 0;
+ }
+
+-#ifdef CONFIG_NET_POLL_CONTROLLER
+-/* Polling 'interrupt' - used by things like netconsole to send skbs
+- * without having to re-enable interrupts. It's not called while
+- * the interrupt routine is executing.
+- */
+-static void igb_netpoll(struct net_device *netdev)
+-{
+- struct igb_adapter *adapter = netdev_priv(netdev);
+- struct e1000_hw *hw = &adapter->hw;
+- struct igb_q_vector *q_vector;
+- int i;
+-
+- for (i = 0; i < adapter->num_q_vectors; i++) {
+- q_vector = adapter->q_vector[i];
+- if (adapter->flags & IGB_FLAG_HAS_MSIX)
+- wr32(E1000_EIMC, q_vector->eims_value);
+- else
+- igb_irq_disable(adapter);
+- napi_schedule(&q_vector->napi);
+- }
+-}
+-#endif /* CONFIG_NET_POLL_CONTROLLER */
+-
+ /**
+ * igb_io_error_detected - called when PCI error is detected
+ * @pdev: Pointer to PCI device
diff --git a/patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval-4c9b658e.patch b/patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval-4c9b658e.patch
new file mode 100644
index 0000000000..90b3e75f11
--- /dev/null
+++ b/patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval-4c9b658e.patch
@@ -0,0 +1,55 @@
+From: Miroslav Lichvar <mlichvar@redhat.com>
+Date: Fri, 26 Oct 2018 19:13:00 +0200
+Subject: igb: shorten maximum PHC timecounter update interval
+Patch-mainline: v4.20-rc2
+Git-commit: 4c9b658eeaefedd402a59e858d8ac3bfdf6153e3
+References: bsc#1117495
+
+The timecounter needs to be updated at least once per ~550 seconds in
+order to avoid a 40-bit SYSTIM timestamp to be misinterpreted as an old
+timestamp.
+
+Since commit 500462a9de65 ("timers: Switch to a non-cascading wheel"),
+scheduling of delayed work seems to be less accurate and a requested
+delay of 540 seconds may actually be longer than 550 seconds. Also, the
+PHC may be adjusted to run up to 6% faster than real time and the system
+clock up to 10% slower. Shorten the delay to 360 seconds to be sure the
+timecounter is updated in time.
+
+This fixes an issue with HW timestamps on 82580/I350/I354 being off by
+~1100 seconds for few seconds every ~9 minutes.
+
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
+Acked-by: Jacob Keller <jacob.e.keller@intel.com>
+Acked-by: Richard Cochran <richardcochran@gmail.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_ptp.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
++++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
+@@ -67,13 +67,15 @@
+ * 2^40 * 10^-9 / 60 = 18.3 minutes.
+ *
+ * SYSTIM is converted to real time using a timecounter. As
+- * timecounter_cyc2time() allows old timestamps, the timecounter
+- * needs to be updated at least once per half of the SYSTIM interval.
+- * Scheduling of delayed work is not very accurate, so we aim for 8
+- * minutes to be sure the actual interval is shorter than 9.16 minutes.
++ * timecounter_cyc2time() allows old timestamps, the timecounter needs
++ * to be updated at least once per half of the SYSTIM interval.
++ * Scheduling of delayed work is not very accurate, and also the NIC
++ * clock can be adjusted to run up to 6% faster and the system clock
++ * up to 10% slower, so we aim for 6 minutes to be sure the actual
++ * interval in the NIC time is shorter than 9.16 minutes.
+ */
+
+-#define IGB_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 8)
++#define IGB_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 6)
+ #define IGB_PTP_TX_TIMEOUT (HZ * 15)
+ #define INCPERIOD_82576 BIT(E1000_TIMINCA_16NS_SHIFT)
+ #define INCVALUE_82576_MASK GENMASK(E1000_TIMINCA_16NS_SHIFT - 1, 0)
diff --git a/patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval.patch b/patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval.patch
new file mode 100644
index 0000000000..14aec04b24
--- /dev/null
+++ b/patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval.patch
@@ -0,0 +1,49 @@
+From: Miroslav Lichvar <mlichvar@redhat.com>
+Date: Fri, 12 Oct 2018 13:13:39 +0200
+Subject: igb: shorten maximum PHC timecounter update interval
+Patch-mainline: v4.20-rc1
+Git-commit: 094bf4d0e9657f6ea1ee3d7e07ce3970796949ce
+References: bsc#1117495
+
+The timecounter needs to be updated at least once per ~550 seconds in
+order to avoid a 40-bit SYSTIM timestamp to be misinterpreted as an old
+timestamp.
+
+Since commit 500462a9d ("timers: Switch to a non-cascading wheel"),
+scheduling of delayed work seems to be less accurate and a requested
+delay of 540 seconds may actually be longer than 550 seconds. Shorten
+the delay to 480 seconds to be sure the timecounter is updated in time.
+
+This fixes an issue with HW timestamps on 82580/I350/I354 being off by
+~1100 seconds for few seconds every ~9 minutes.
+
+Cc: Jacob Keller <jacob.e.keller@intel.com>
+Cc: Richard Cochran <richardcochran@gmail.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_ptp.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
++++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
+@@ -65,9 +65,15 @@
+ *
+ * The 40 bit 82580 SYSTIM overflows every
+ * 2^40 * 10^-9 / 60 = 18.3 minutes.
++ *
++ * SYSTIM is converted to real time using a timecounter. As
++ * timecounter_cyc2time() allows old timestamps, the timecounter
++ * needs to be updated at least once per half of the SYSTIM interval.
++ * Scheduling of delayed work is not very accurate, so we aim for 8
++ * minutes to be sure the actual interval is shorter than 9.16 minutes.
+ */
+
+-#define IGB_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 9)
++#define IGB_SYSTIM_OVERFLOW_PERIOD (HZ * 60 * 8)
+ #define IGB_PTP_TX_TIMEOUT (HZ * 15)
+ #define INCPERIOD_82576 BIT(E1000_TIMINCA_16NS_SHIFT)
+ #define INCVALUE_82576_MASK GENMASK(E1000_TIMINCA_16NS_SHIFT - 1, 0)
diff --git a/patches.drivers/igb_main-Mark-expected-switch-fall-throughs.patch b/patches.drivers/igb_main-Mark-expected-switch-fall-throughs.patch
new file mode 100644
index 0000000000..ba152f860f
--- /dev/null
+++ b/patches.drivers/igb_main-Mark-expected-switch-fall-throughs.patch
@@ -0,0 +1,37 @@
+From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Date: Tue, 7 Aug 2018 18:22:22 -0500
+Subject: igb_main: Mark expected switch fall-throughs
+Patch-mainline: v4.19-rc1
+Git-commit: 7e9660ff6ff1c154f2590ade0ac3ad563f1522ab
+References: bsc#1117495
+
+In preparation to enabling -Wimplicit-fallthrough, mark switch cases
+where we are expecting to fall through.
+
+Addresses-Coverity-ID: 200521 ("Missing break in switch")
+Addresses-Coverity-ID: 114797 ("Missing break in switch")
+Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -5106,6 +5106,7 @@ bool igb_has_link(struct igb_adapter *ad
+ case e1000_media_type_copper:
+ if (!hw->mac.get_link_status)
+ return true;
++ /* fall through */
+ case e1000_media_type_internal_serdes:
+ hw->mac.ops.check_for_link(hw);
+ link_active = !hw->mac.get_link_status;
+@@ -5753,6 +5754,7 @@ csum_failed:
+ type_tucmd = E1000_ADVTXD_TUCMD_L4T_SCTP;
+ break;
+ }
++ /* fall through */
+ default:
+ skb_checksum_help(skb);
+ goto csum_failed;
diff --git a/patches.drivers/igbvf-netdev-Mark-expected-switch-fall-through.patch b/patches.drivers/igbvf-netdev-Mark-expected-switch-fall-through.patch
new file mode 100644
index 0000000000..1d93aa3871
--- /dev/null
+++ b/patches.drivers/igbvf-netdev-Mark-expected-switch-fall-through.patch
@@ -0,0 +1,28 @@
+From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Date: Tue, 7 Aug 2018 18:24:04 -0500
+Subject: igbvf: netdev: Mark expected switch fall-through
+Patch-mainline: v4.19-rc1
+Git-commit: 76df93b1779563cda9d38237e5b6422df9ebd2e5
+References: bsc#1117495
+
+In preparation to enabling -Wimplicit-fallthrough, mark switch cases
+where we are expecting to fall through.
+
+Addresses-Coverity-ID: 114801 ("Missing break in switch")
+Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/intel/igbvf/netdev.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/intel/igbvf/netdev.c
++++ b/drivers/net/ethernet/intel/igbvf/netdev.c
+@@ -2125,6 +2125,7 @@ csum_failed:
+ type_tucmd = E1000_ADVTXD_TUCMD_L4T_SCTP;
+ break;
+ }
++ /* fall through */
+ default:
+ skb_checksum_help(skb);
+ goto csum_failed;
diff --git a/series.conf b/series.conf
index 6abcecc4c2..5a239e0591 100644
--- a/series.conf
+++ b/series.conf
@@ -24979,6 +24979,10 @@
patches.drivers/net-sched-act_pedit-fix-possible-memory-leak-in-tcf_.patch
patches.drivers/net-Clear-skb-tstamp-only-on-the-forwarding-path.patch
patches.drivers/net-sched-Allow-creating-a-Qdisc-watchdog-with-other.patch
+ patches.drivers/igb-Refactor-igb_configure_cbs.patch
+ patches.drivers/igb-Only-change-Tx-arbitration-when-CBS-is-on.patch
+ patches.drivers/igb-Refactor-igb_offload_cbs.patch
+ patches.drivers/igb-Only-call-skb_tx_timestamp-after-descriptors-are.patch
patches.drivers/qed-remove-redundant-pointer-name.patch
patches.drivers/cxgb4-Add-support-to-read-actual-provisioned-resourc.patch
patches.drivers/net-limit-each-hash-list-length-to-MAX_GRO_SKBS.patch
@@ -25331,6 +25335,8 @@
patches.drivers/net-sched-unmark-chain-as-explicitly-created-on-dele.patch
patches.drivers/ixgbe-Do-not-allow-LRO-or-MTU-change-with-XDP.patch
patches.drivers/ixgbe-add-ipsec-security-registers-into-ethtool-regi.patch
+ patches.drivers/igb-Remove-superfluous-reset-to-PHY-and-page-0-selec.patch
+ patches.drivers/igb-Use-dma_wmb-instead-of-wmb-before-doorbell-write.patch
patches.drivers/ixgbe-Reorder-Tx-Rx-shutdown-to-reduce-time-needed-t.patch
patches.drivers/ixgbe-Refactor-queue-disable-logic-to-take-completio.patch
patches.drivers/netdevsim-make-debug-dirs-dentries-static.patch
@@ -25506,6 +25512,10 @@
patches.drivers/i40e_txrx-mark-expected-switch-fall-through.patch
patches.drivers/net-mlx4-mcg-Mark-expected-switch-fall-throughs.patch
patches.drivers/net-mlx4-en_rx-Mark-expected-switch-fall-throughs.patch
+ patches.drivers/igb_main-Mark-expected-switch-fall-throughs.patch
+ patches.drivers/igb-e1000_82575-Mark-expected-switch-fall-through.patch
+ patches.drivers/igb-e1000_phy-Mark-expected-switch-fall-through.patch
+ patches.drivers/igbvf-netdev-Mark-expected-switch-fall-through.patch
patches.drivers/net-mlx5e-Mark-expected-switch-fall-throughs.patch
patches.drivers/qed-qed_dev-Mark-expected-switch-fall-throughs.patch
patches.drivers/netxen_nic-Mark-expected-switch-fall-throughs.patch
@@ -25787,6 +25797,7 @@
patches.drivers/tpm-allow-tpm_tis-drivers-to-set-hwrng-quality.patch
patches.fixes/evm-Don-t-deadlock-if-a-crypto-algorithm-is-unavaila.patch
patches.drivers/PCI-AER-Expose-internal-API-for-obtaining-AER-inform.patch
+ patches.drivers/igb-Remove-unnecessary-include-of-linux-pci-aspm.h.patch
patches.drivers/PCI-DPC-Leave-interrupts-enabled-while-handling-even.patch
patches.drivers/PCI-DPC-Defer-event-handling-to-work-queue.patch
patches.drivers/PCI-DPC-Remove-rp_pio_status-from-dpc-struct.patch
@@ -26724,6 +26735,8 @@
patches.drivers/tools-bpftool-return-from-do_event_pipe-on-bad-argum.patch
patches.drivers/e1000-check-on-netif_running-before-calling-e1000_up.patch
patches.drivers/e1000-ensure-to-free-old-tx-rx-rings-in-set_ringpara.patch
+ patches.drivers/igb-Replace-GFP_ATOMIC-with-GFP_KERNEL-in-igb_sw_ini.patch
+ patches.drivers/igb-Replace-mdelay-with-msleep-in-igb_integrated_phy.patch
patches.drivers/ixgbe-Replace-GFP_ATOMIC-with-GFP_KERNEL.patch
patches.drivers/ixgbe-Prevent-unsupported-configurations-with-XDP.patch
patches.drivers/ixgbe-fix-driver-behaviour-after-issuing-VFLR.patch
@@ -27089,6 +27102,7 @@
patches.drivers/netpoll-make-ndo_poll_controller-optional.patch
patches.drivers/ixgbe-remove-ndo_poll_controller.patch
patches.drivers/ixgbevf-remove-ndo_poll_controller.patch
+ patches.drivers/igb-remove-ndo_poll_controller.patch
patches.drivers/ice-remove-ndo_poll_controller.patch
patches.drivers/i40evf-remove-ndo_poll_controller.patch
patches.drivers/mlx4-remove-ndo_poll_controller.patch
@@ -28110,6 +28124,7 @@
patches.suse/rtnetlink-Disallow-FDB-configuration-for-non-Etherne.patch
patches.drivers/vhost-Fix-Spectre-V1-vulnerability.patch
patches.fixes/bpf-fix-partial-copy-of-map_ptr-when-dst-is-scalar.patch
+ patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval.patch
patches.suse/net-stmmac-Fix-stmmac_mdio_reset-when-building-stmma.patch
patches.suse/openvswitch-Fix-push-pop-ethernet-validation.patch
patches.drivers/vhost-scsi-truncate-T10-PI-iov_iter-to-prot_bytes.patch
@@ -28187,6 +28202,7 @@
patches.drivers/ice-Fix-napi-delete-calls-for-remove.patch
patches.drivers/ice-Fix-tx_timeout-in-PF-driver.patch
patches.drivers/ice-Fix-the-bytecount-sent-to-netdev_tx_sent_queue.patch
+ patches.drivers/igb-shorten-maximum-PHC-timecounter-update-interval-4c9b658e.patch
patches.drivers/ice-Change-req_speeds-to-be-u16.patch
patches.drivers/ibmvnic-fix-accelerated-VLAN-handling.patch
patches.suse/net-smsc95xx-Fix-MTU-range.patch
@@ -28274,6 +28290,7 @@
patches.arch/kvm-x86-fix-kernel-info-leak-in-kvm_hc_clock_pairing-hypercall
patches.fixes/kvm-svm-ensure-an-ibpb-on-all-affected-cpus-when-freeing-a-vmcb.patch
patches.suse/0003-Btrfs-send-fix-infinite-loop-due-to-directory-rename.patch
+ patches.drivers/igb-fix-uninitialized-variables.patch
patches.drivers/ALSA-ac97-Fix-incorrect-bit-shift-at-AC97-SPSA-contr.patch
patches.drivers/ALSA-hda-Add-ASRock-N68C-S-UCC-the-power_save-blackl.patch
patches.drivers/ALSA-hda-realtek-fix-headset-mic-detection-for-MSI-M.patch