import kmod-redhat-ice-0.8.2_k_dup8.2-1.el8_2

c8 imports/c8/kmod-redhat-ice-0.8.2_k_dup8.2-1.el8_2
CentOS Sources 4 years ago committed by MSVSphere Packaging Team
commit 1318988706

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/ice-redhat-0.8.2_k_dup8.2.tar.bz2

@ -0,0 +1 @@
c6de5fc5ef06fbf2a1fe259a1337c0b009cb42dd SOURCES/ice-redhat-0.8.2_k_dup8.2.tar.bz2

@ -0,0 +1,181 @@
From 1010d8b2f7e26ee3ae02b6220ca7874fed2214a1 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:09:24 +0200
Subject: [PATCH 1/5] Revert "[netdrv] ice: Don't reset and rebuild for Tx
timeout on PFC enabled queue"
This reverts commit 963f10c79fa8be5b8560ba3017f549fd83514cd4.
---
drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 58 -------------------------
drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 23 ----------
drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 1 -
drivers/net/ethernet/intel/ice/ice_main.c | 10 -----
drivers/net/ethernet/intel/ice/ice_type.h | 2 -
5 files changed, 94 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
index 3c7f604c0c49..6e1be15ee703 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
@@ -63,64 +63,6 @@ u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg *dcbcfg)
}
/**
- * ice_is_pfc_causing_hung_q
- * @pf: pointer to PF structure
- * @txqueue: Tx queue which is supposedly hung queue
- *
- * find if PFC is causing the hung queue, if yes return true else false
- */
-bool ice_is_pfc_causing_hung_q(struct ice_pf *pf, unsigned int txqueue)
-{
- u8 num_tcs = 0, i, tc, up_mapped_tc, up_in_tc = 0;
- u64 ref_prio_xoff[ICE_MAX_UP];
- struct ice_vsi *vsi;
- u32 up2tc;
-
- vsi = ice_get_main_vsi(pf);
- if (!vsi)
- return false;
-
- ice_for_each_traffic_class(i)
- if (vsi->tc_cfg.ena_tc & BIT(i))
- num_tcs++;
-
- /* first find out the TC to which the hung queue belongs to */
- for (tc = 0; tc < num_tcs - 1; tc++)
- if (ice_find_q_in_range(vsi->tc_cfg.tc_info[tc].qoffset,
- vsi->tc_cfg.tc_info[tc + 1].qoffset,
- txqueue))
- break;
-
- /* Build a bit map of all UPs associated to the suspect hung queue TC,
- * so that we check for its counter increment.
- */
- up2tc = rd32(&pf->hw, PRTDCB_TUP2TC);
- for (i = 0; i < ICE_MAX_UP; i++) {
- up_mapped_tc = (up2tc >> (i * 3)) & 0x7;
- if (up_mapped_tc == tc)
- up_in_tc |= BIT(i);
- }
-
- /* Now that we figured out that hung queue is PFC enabled, still the
- * Tx timeout can be legitimate. So to make sure Tx timeout is
- * absolutely caused by PFC storm, check if the counters are
- * incrementing.
- */
- for (i = 0; i < ICE_MAX_UP; i++)
- if (up_in_tc & BIT(i))
- ref_prio_xoff[i] = pf->stats.priority_xoff_rx[i];
-
- ice_update_dcb_stats(pf);
-
- for (i = 0; i < ICE_MAX_UP; i++)
- if (up_in_tc & BIT(i))
- if (pf->stats.priority_xoff_rx[i] > ref_prio_xoff[i])
- return true;
-
- return false;
-}
-
-/**
* ice_dcb_get_mode - gets the DCB mode
* @port_info: pointer to port info structure
* @host: if set it's HOST if not it's MANAGED
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.h b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h
index 7c42324494d2..37680e815b02 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.h
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h
@@ -17,8 +17,6 @@
void ice_dcb_rebuild(struct ice_pf *pf);
u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg *dcbcfg);
u8 ice_dcb_get_num_tc(struct ice_dcbx_cfg *dcbcfg);
-void ice_vsi_set_dcb_tc_cfg(struct ice_vsi *vsi);
-bool ice_is_pfc_causing_hung_q(struct ice_pf *pf, unsigned int txqueue);
u8 ice_dcb_get_tc(struct ice_vsi *vsi, int queue_index);
int
ice_pf_dcb_cfg(struct ice_pf *pf, struct ice_dcbx_cfg *new_cfg, bool locked);
@@ -34,20 +32,6 @@ void
ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf,
struct ice_rq_event_info *event);
void ice_vsi_cfg_netdev_tc(struct ice_vsi *vsi, u8 ena_tc);
-
-/**
- * ice_find_q_in_range
- * @low: start of queue range for a TC i.e. offset of TC
- * @high: start of queue for next TC
- * @tx_q: hung_queue/tx_queue
- *
- * finds if queue 'tx_q' falls between the two offsets of any given TC
- */
-static inline bool ice_find_q_in_range(u16 low, u16 high, unsigned int tx_q)
-{
- return (tx_q >= low) && (tx_q < high);
-}
-
static inline void
ice_set_cgd_num(struct ice_tlan_ctx *tlan_ctx, struct ice_ring *ring)
{
@@ -95,13 +79,6 @@ ice_tx_prepare_vlan_flags_dcb(struct ice_ring __always_unused *tx_ring,
return 0;
}
-static inline bool
-ice_is_pfc_causing_hung_q(struct ice_pf __always_unused *pf,
- unsigned int __always_unused txqueue)
-{
- return false;
-}
-
#define ice_update_dcb_stats(pf) do {} while (0)
#define ice_pf_dcb_recfg(pf) do {} while (0)
#define ice_vsi_cfg_dcb_rings(vsi) do {} while (0)
diff --git a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
index 2f1c776747a4..43c1258695b5 100644
--- a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
+++ b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
@@ -55,7 +55,6 @@
#define PRTDCB_GENS 0x00083020
#define PRTDCB_GENS_DCBX_STATUS_S 0
#define PRTDCB_GENS_DCBX_STATUS_M ICE_M(0x7, 0)
-#define PRTDCB_TUP2TC 0x001D26C0 /* Reset Source: CORER */
#define GL_PREEXT_L2_PMASK0(_i) (0x0020F0FC + ((_i) * 4))
#define GL_PREEXT_L2_PMASK1(_i) (0x0020F108 + ((_i) * 4))
#define GLFLXP_RXDID_FLX_WRD_0(_i) (0x0045c800 + ((_i) * 4))
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 2719d7416e4e..a9ce5720588f 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5452,16 +5452,6 @@ static void ice_tx_timeout(struct net_device *netdev, unsigned int txqueue)
pf->tx_timeout_count++;
- /* Check if PFC is enabled for the TC to which the queue belongs
- * to. If yes then Tx timeout is not caused by a hung queue, no
- * need to reset and rebuild
- */
- if (ice_is_pfc_causing_hung_q(pf, txqueue)) {
- dev_info(ice_pf_to_dev(pf), "Fake Tx hang detected on queue %u, timeout caused by PFC storm\n",
- txqueue);
- return;
- }
-
/* now that we have an index, find the tx_ring struct */
for (i = 0; i < vsi->num_txq; i++)
if (vsi->tx_rings[i] && vsi->tx_rings[i]->desc)
diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h
index c1ad8622e65c..1dd455006a2c 100644
--- a/drivers/net/ethernet/intel/ice/ice_type.h
+++ b/drivers/net/ethernet/intel/ice/ice_type.h
@@ -661,8 +661,6 @@ struct ice_eth_stats {
u64 tx_errors; /* tepc */
};
-#define ICE_MAX_UP 8
-
/* Statistics collected by the MAC */
struct ice_hw_port_stats {
/* eth stats collected by the port */
--
2.13.6

@ -0,0 +1,33 @@
From 8f4c2bb3099164da674e368aba13388d07c8f874 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:09:42 +0200
Subject: [PATCH 2/5] Revert "[netdrv] ice: Fix format specifier"
This reverts commit 8ae7b8e7e4f25904a36660971dafc8949d7f318a.
---
drivers/net/ethernet/intel/ice/ice_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index a9ce5720588f..b6e5dc22f97f 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5478,13 +5478,13 @@ static void ice_tx_timeout(struct net_device *netdev, unsigned int txqueue)
/* Read interrupt register */
val = rd32(hw, GLINT_DYN_CTL(tx_ring->q_vector->reg_idx));
- netdev_info(netdev, "tx_timeout: VSI_num: %d, Q %u, NTC: 0x%x, HW_HEAD: 0x%x, NTU: 0x%x, INT: 0x%x\n",
+ netdev_info(netdev, "tx_timeout: VSI_num: %d, Q %d, NTC: 0x%x, HW_HEAD: 0x%x, NTU: 0x%x, INT: 0x%x\n",
vsi->vsi_num, txqueue, tx_ring->next_to_clean,
head, tx_ring->next_to_use, val);
}
pf->tx_timeout_last_recovery = jiffies;
- netdev_info(netdev, "tx_timeout recovery level %d, txqueue %u\n",
+ netdev_info(netdev, "tx_timeout recovery level %d, txqueue %d\n",
pf->tx_timeout_recovery_level, txqueue);
switch (pf->tx_timeout_recovery_level) {
--
2.13.6

@ -0,0 +1,26 @@
From 8ca75fae142a8de76d62a8b2249f21590d7201a8 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:09:53 +0200
Subject: [PATCH 3/5] Revert "[netdrv] ice: add function argument description
to function header comment"
This reverts commit de409a958a600e1edaba3b771ab70b1762ca842c.
---
drivers/net/ethernet/intel/ice/ice_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index b6e5dc22f97f..4853a1e0632c 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5440,7 +5440,6 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
/**
* ice_tx_timeout - Respond to a Tx Hang
* @netdev: network interface device structure
- * @txqueue: Tx queue
*/
static void ice_tx_timeout(struct net_device *netdev, unsigned int txqueue)
{
--
2.13.6

@ -0,0 +1,86 @@
From 76a64685e812d8f1de840773358c2ce821ecb370 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:10:02 +0200
Subject: [PATCH 4/5] Revert "[netdrv] ice: Removing hung_queue variable to use
txqueue function parameter"
This reverts commit 669e50a2e214aea57e159e9af04196e32dfb2856.
---
drivers/net/ethernet/intel/ice/ice_main.c | 41 ++++++++++++++++++++++---------
1 file changed, 30 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 4853a1e0632c..ed66596ba75d 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -5447,17 +5447,36 @@ static void ice_tx_timeout(struct net_device *netdev, unsigned int txqueue)
struct ice_ring *tx_ring = NULL;
struct ice_vsi *vsi = np->vsi;
struct ice_pf *pf = vsi->back;
+ int hung_queue = -1;
u32 i;
pf->tx_timeout_count++;
- /* now that we have an index, find the tx_ring struct */
- for (i = 0; i < vsi->num_txq; i++)
- if (vsi->tx_rings[i] && vsi->tx_rings[i]->desc)
- if (txqueue == vsi->tx_rings[i]->q_index) {
- tx_ring = vsi->tx_rings[i];
- break;
- }
+ /* find the stopped queue the same way dev_watchdog() does */
+ for (i = 0; i < netdev->num_tx_queues; i++) {
+ unsigned long trans_start;
+ struct netdev_queue *q;
+
+ q = netdev_get_tx_queue(netdev, i);
+ trans_start = q->trans_start;
+ if (netif_xmit_stopped(q) &&
+ time_after(jiffies,
+ trans_start + netdev->watchdog_timeo)) {
+ hung_queue = i;
+ break;
+ }
+ }
+
+ if (i == netdev->num_tx_queues)
+ netdev_info(netdev, "tx_timeout: no netdev hung queue found\n");
+ else
+ /* now that we have an index, find the tx_ring struct */
+ for (i = 0; i < vsi->num_txq; i++)
+ if (vsi->tx_rings[i] && vsi->tx_rings[i]->desc)
+ if (hung_queue == vsi->tx_rings[i]->q_index) {
+ tx_ring = vsi->tx_rings[i];
+ break;
+ }
/* Reset recovery level if enough time has elapsed after last timeout.
* Also ensure no new reset action happens before next timeout period.
@@ -5472,19 +5491,19 @@ static void ice_tx_timeout(struct net_device *netdev, unsigned int txqueue)
struct ice_hw *hw = &pf->hw;
u32 head, val = 0;
- head = (rd32(hw, QTX_COMM_HEAD(vsi->txq_map[txqueue])) &
+ head = (rd32(hw, QTX_COMM_HEAD(vsi->txq_map[hung_queue])) &
QTX_COMM_HEAD_HEAD_M) >> QTX_COMM_HEAD_HEAD_S;
/* Read interrupt register */
val = rd32(hw, GLINT_DYN_CTL(tx_ring->q_vector->reg_idx));
netdev_info(netdev, "tx_timeout: VSI_num: %d, Q %d, NTC: 0x%x, HW_HEAD: 0x%x, NTU: 0x%x, INT: 0x%x\n",
- vsi->vsi_num, txqueue, tx_ring->next_to_clean,
+ vsi->vsi_num, hung_queue, tx_ring->next_to_clean,
head, tx_ring->next_to_use, val);
}
pf->tx_timeout_last_recovery = jiffies;
- netdev_info(netdev, "tx_timeout recovery level %d, txqueue %d\n",
- pf->tx_timeout_recovery_level, txqueue);
+ netdev_info(netdev, "tx_timeout recovery level %d, hung_queue %d\n",
+ pf->tx_timeout_recovery_level, hung_queue);
switch (pf->tx_timeout_recovery_level) {
case 1:
--
2.13.6

@ -0,0 +1,253 @@
From 7a7ecb74667043f33730a45313666959df39e4f3 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:10:28 +0200
Subject: [PATCH 5/5] Revert "[netdev] pass the stuck queue to the timeout
handler"
This reverts commit 27e97a749956bd369fe277d255d1aae6f10873e7.
---
arch/m68k/emu/nfeth.c | 2 +-
arch/um/drivers/net_kern.c | 2 +-
arch/um/drivers/vector_kern.c | 2 +-
arch/xtensa/platforms/iss/network.c | 2 +-
drivers/char/pcmcia/synclink_cs.c | 2 +-
drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +-
drivers/isdn/i4l/isdn_net.c | 2 +-
drivers/message/fusion/mptlan.c | 2 +-
drivers/misc/sgi-xp/xpnet.c | 2 +-
drivers/net/appletalk/cops.c | 4 ++--
drivers/net/arcnet/arcdevice.h | 2 +-
drivers/net/arcnet/arcnet.c | 2 +-
drivers/net/ethernet/3com/3c509.c | 4 ++--
drivers/net/ethernet/3com/3c515.c | 4 ++--
drivers/net/ethernet/3com/3c574_cs.c | 4 ++--
drivers/net/ethernet/3com/3c589_cs.c | 4 ++--
drivers/net/ethernet/3com/3c59x.c | 4 ++--
drivers/net/ethernet/3com/typhoon.c | 2 +-
drivers/net/ethernet/8390/8390.c | 4 ++--
drivers/net/ethernet/8390/8390.h | 4 ++--
drivers/net/ethernet/8390/8390p.c | 4 ++--
drivers/net/ethernet/8390/axnet_cs.c | 4 ++--
drivers/net/ethernet/8390/lib8390.c | 2 +-
drivers/net/ethernet/adaptec/starfire.c | 4 ++--
drivers/net/ethernet/agere/et131x.c | 2 +-
drivers/net/ethernet/allwinner/sun4i-emac.c | 2 +-
drivers/net/ethernet/alteon/acenic.c | 4 ++--
drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-
drivers/net/ethernet/amd/7990.c | 2 +-
drivers/net/ethernet/amd/7990.h | 2 +-
drivers/net/ethernet/amd/a2065.c | 2 +-
drivers/net/ethernet/amd/am79c961a.c | 2 +-
drivers/net/ethernet/amd/amd8111e.c | 2 +-
drivers/net/ethernet/amd/ariadne.c | 2 +-
drivers/net/ethernet/amd/atarilance.c | 4 ++--
drivers/net/ethernet/amd/au1000_eth.c | 2 +-
drivers/net/ethernet/amd/declance.c | 2 +-
drivers/net/ethernet/amd/lance.c | 4 ++--
drivers/net/ethernet/amd/ni65.c | 4 ++--
drivers/net/ethernet/amd/nmclan_cs.c | 4 ++--
drivers/net/ethernet/amd/pcnet32.c | 4 ++--
drivers/net/ethernet/amd/sunlance.c | 2 +-
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +-
drivers/net/ethernet/apm/xgene-v2/main.c | 2 +-
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 +-
drivers/net/ethernet/apple/macmace.c | 4 ++--
drivers/net/ethernet/atheros/alx/main.c | 2 +-
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +-
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 2 +-
drivers/net/ethernet/atheros/atlx/atl2.c | 2 +-
drivers/net/ethernet/atheros/atlx/atlx.c | 2 +-
drivers/net/ethernet/broadcom/b44.c | 2 +-
drivers/net/ethernet/broadcom/bcmsysport.c | 2 +-
drivers/net/ethernet/broadcom/bnx2.c | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +-
drivers/net/ethernet/broadcom/sb1250-mac.c | 4 ++--
drivers/net/ethernet/broadcom/tg3.c | 2 +-
drivers/net/ethernet/calxeda/xgmac.c | 2 +-
drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +-
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 2 +-
drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c | 4 ++--
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +-
drivers/net/ethernet/cirrus/cs89x0.c | 2 +-
drivers/net/ethernet/cisco/enic/enic_main.c | 2 +-
drivers/net/ethernet/cortina/gemini.c | 2 +-
drivers/net/ethernet/davicom/dm9000.c | 2 +-
drivers/net/ethernet/dec/tulip/de2104x.c | 2 +-
drivers/net/ethernet/dec/tulip/tulip_core.c | 4 ++--
drivers/net/ethernet/dec/tulip/winbond-840.c | 4 ++--
drivers/net/ethernet/dlink/dl2k.c | 4 ++--
drivers/net/ethernet/dlink/sundance.c | 4 ++--
drivers/net/ethernet/emulex/benet/be_main.c | 2 +-
drivers/net/ethernet/ethoc.c | 2 +-
drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
drivers/net/ethernet/fealnx.c | 4 ++--
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
drivers/net/ethernet/freescale/fec_main.c | 2 +-
drivers/net/ethernet/freescale/fec_mpc52xx.c | 2 +-
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +-
drivers/net/ethernet/freescale/gianfar.c | 4 ++--
drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
drivers/net/ethernet/fujitsu/fmvj18x_cs.c | 4 ++--
drivers/net/ethernet/google/gve/gve_main.c | 2 +-
drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +-
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +-
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 2 +-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
drivers/net/ethernet/huawei/hinic/hinic_main.c | 2 +-
drivers/net/ethernet/i825xx/82596.c | 4 ++--
drivers/net/ethernet/i825xx/ether1.c | 4 ++--
drivers/net/ethernet/i825xx/lib82596.c | 4 ++--
drivers/net/ethernet/i825xx/sun3_82586.c | 4 ++--
drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +-
drivers/net/ethernet/ibm/emac/core.c | 2 +-
drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
drivers/net/ethernet/intel/e100.c | 2 +-
drivers/net/ethernet/intel/e1000/e1000_main.c | 4 ++--
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
drivers/net/ethernet/intel/igbvf/netdev.c | 2 +-
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 4 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c | 4 +---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +-
drivers/net/ethernet/jme.c | 2 +-
drivers/net/ethernet/korina.c | 2 +-
drivers/net/ethernet/lantiq_etop.c | 2 +-
drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +-
drivers/net/ethernet/marvell/pxa168_eth.c | 2 +-
drivers/net/ethernet/marvell/skge.c | 2 +-
drivers/net/ethernet/marvell/sky2.c | 2 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
drivers/net/ethernet/micrel/ks8842.c | 2 +-
drivers/net/ethernet/micrel/ksz884x.c | 2 +-
drivers/net/ethernet/microchip/enc28j60.c | 2 +-
drivers/net/ethernet/microchip/encx24j600.c | 2 +-
drivers/net/ethernet/natsemi/natsemi.c | 4 ++--
drivers/net/ethernet/natsemi/ns83820.c | 4 ++--
drivers/net/ethernet/natsemi/sonic.c | 2 +-
drivers/net/ethernet/natsemi/sonic.h | 2 +-
drivers/net/ethernet/neterion/s2io.c | 2 +-
drivers/net/ethernet/neterion/s2io.h | 2 +-
drivers/net/ethernet/neterion/vxge/vxge-main.c | 2 +-
drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +-
drivers/net/ethernet/nvidia/forcedeth.c | 2 +-
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +-
drivers/net/ethernet/packetengines/hamachi.c | 4 ++--
drivers/net/ethernet/packetengines/yellowfin.c | 4 ++--
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++--
drivers/net/ethernet/qlogic/qla3xxx.c | 2 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 4 ++--
drivers/net/ethernet/qualcomm/emac/emac.c | 2 +-
drivers/net/ethernet/qualcomm/qca_spi.c | 2 +-
drivers/net/ethernet/qualcomm/qca_uart.c | 2 +-
drivers/net/ethernet/rdc/r6040.c | 2 +-
drivers/net/ethernet/realtek/8139cp.c | 2 +-
drivers/net/ethernet/realtek/8139too.c | 4 ++--
drivers/net/ethernet/realtek/atp.c | 4 ++--
drivers/net/ethernet/realtek/r8169_main.c | 2 +-
drivers/net/ethernet/renesas/ravb_main.c | 2 +-
drivers/net/ethernet/renesas/sh_eth.c | 2 +-
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 2 +-
drivers/net/ethernet/seeq/ether3.c | 4 ++--
drivers/net/ethernet/seeq/sgiseeq.c | 2 +-
drivers/net/ethernet/sfc/efx.c | 2 +-
drivers/net/ethernet/sfc/falcon/efx.c | 2 +-
drivers/net/ethernet/sgi/ioc3-eth.c | 4 ++--
drivers/net/ethernet/sgi/meth.c | 4 ++--
drivers/net/ethernet/silan/sc92031.c | 2 +-
drivers/net/ethernet/sis/sis190.c | 2 +-
drivers/net/ethernet/sis/sis900.c | 4 ++--
drivers/net/ethernet/smsc/epic100.c | 4 ++--
drivers/net/ethernet/smsc/smc911x.c | 2 +-
drivers/net/ethernet/smsc/smc9194.c | 4 ++--
drivers/net/ethernet/smsc/smc91c92_cs.c | 4 ++--
drivers/net/ethernet/smsc/smc91x.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
drivers/net/ethernet/sun/cassini.c | 2 +-
drivers/net/ethernet/sun/niu.c | 2 +-
drivers/net/ethernet/sun/sunbmac.c | 2 +-
drivers/net/ethernet/sun/sungem.c | 2 +-
drivers/net/ethernet/sun/sunhme.c | 2 +-
drivers/net/ethernet/sun/sunqe.c | 2 +-
drivers/net/ethernet/sun/sunvnet_common.c | 2 +-
drivers/net/ethernet/sun/sunvnet_common.h | 2 +-
drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 2 +-
drivers/net/ethernet/ti/cpmac.c | 2 +-
drivers/net/ethernet/ti/davinci_emac.c | 2 +-
drivers/net/ethernet/ti/netcp_core.c | 2 +-
drivers/net/ethernet/ti/tlan.c | 6 +++---
drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 +-
drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +-
drivers/net/ethernet/toshiba/spider_net.c | 2 +-
drivers/net/ethernet/toshiba/tc35815.c | 4 ++--
drivers/net/ethernet/via/via-rhine.c | 4 ++--
drivers/net/ethernet/wiznet/w5100.c | 2 +-
drivers/net/ethernet/wiznet/w5300.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
drivers/net/ethernet/xircom/xirc2ps_cs.c | 4 ++--
drivers/net/fjes/fjes_main.c | 4 ++--
drivers/net/slip/slip.c | 2 +-
drivers/net/usb/catc.c | 2 +-
drivers/net/usb/hso.c | 2 +-
drivers/net/usb/ipheth.c | 2 +-
drivers/net/usb/kaweth.c | 2 +-
drivers/net/usb/lan78xx.c | 2 +-
drivers/net/usb/pegasus.c | 2 +-
drivers/net/usb/r8152.c | 2 +-
drivers/net/usb/rtl8150.c | 2 +-
drivers/net/usb/usbnet.c | 2 +-
drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
drivers/net/wan/cosa.c | 4 ++--
drivers/net/wan/farsync.c | 2 +-
drivers/net/wan/lmc/lmc_main.c | 4 ++--
drivers/net/wan/x25_asy.c | 2 +-
drivers/net/wimax/i2400m/netdev.c | 2 +-
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +-
drivers/net/wireless/intersil/hostap/hostap_main.c | 2 +-
drivers/net/wireless/intersil/orinoco/main.c | 2 +-
drivers/net/wireless/intersil/orinoco/orinoco.h | 2 +-
drivers/net/wireless/intersil/prism54/islpci_eth.c | 2 +-
drivers/net/wireless/intersil/prism54/islpci_eth.h | 2 +-
drivers/net/wireless/marvell/mwifiex/main.c | 2 +-
drivers/net/wireless/quantenna/qtnfmac/core.c | 2 +-
drivers/net/wireless/wl3501_cs.c | 2 +-
drivers/net/wireless/zydas/zd1201.c | 2 +-
drivers/s390/net/qeth_core_main.c | 2 +-
drivers/staging/ks7010/ks_wlan_net.c | 4 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +-
drivers/staging/rtl8192u/r8192U_core.c | 2 +-
drivers/staging/unisys/visornic/visornic_main.c | 2 +-
drivers/staging/wlan-ng/p80211netdev.c | 4 ++--
drivers/tty/n_gsm.c | 2 +-
drivers/tty/synclink.c | 2 +-
drivers/tty/synclink_gt.c | 2 +-
drivers/tty/synclinkmp.c | 2 +-
include/linux/netdevice.h | 6 ++----
include/linux/usb/usbnet.h | 2 +-
net/atm/lec.c | 2 +-
net/bluetooth/bnep/netdev.c | 2 +-
net/sched/sch_generic.c | 2 +-
230 files changed, 290 insertions(+), 294 deletions(-)
Index: src/drivers/net/ethernet/intel/ice/ice_main.c
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 19:11:14.661342005 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 19:11:18.198345378 +0200
@@ -5441,7 +5441,7 @@
* ice_tx_timeout - Respond to a Tx Hang
* @netdev: network interface device structure
*/
-static void ice_tx_timeout(struct net_device *netdev, unsigned int txqueue)
+static void ice_tx_timeout(struct net_device *netdev)
{
struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_ring *tx_ring = NULL;

@ -0,0 +1,175 @@
From 1b267d3510d8ee9ab46ec4101ee481cda310cf8b Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:15:44 +0200
Subject: [PATCH 6/6] Revert "[netdrv] ice: add a devlink region for dumping
NVM contents"
This reverts commit 14d67603e80fde05381c96562be7f191d568237f.
---
drivers/net/ethernet/intel/ice/ice.h | 2 -
drivers/net/ethernet/intel/ice/ice_devlink.c | 96 ----------------------------
drivers/net/ethernet/intel/ice/ice_devlink.h | 3 -
drivers/net/ethernet/intel/ice/ice_main.c | 4 --
4 files changed, 105 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 5792ee616b5c..54b9d567841e 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -373,8 +373,6 @@ struct ice_pf {
/* devlink port data */
struct devlink_port devlink_port;
- struct devlink_region *nvm_region;
-
/* OS reserved IRQ details */
struct msix_entry *msix_entries;
struct ice_res_tracker *irq_tracker;
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
index a73d06e06b5d..fafec5c6b407 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.c
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.c
@@ -341,99 +341,3 @@ void ice_devlink_destroy_port(struct ice_pf *pf)
devlink_port_type_clear(&pf->devlink_port);
devlink_port_unregister(&pf->devlink_port);
}
-
-/**
- * ice_devlink_nvm_snapshot - Capture a snapshot of the Shadow RAM contents
- * @devlink: the devlink instance
- * @extack: extended ACK response structure
- * @data: on exit points to snapshot data buffer
- *
- * This function is called in response to the DEVLINK_CMD_REGION_TRIGGER for
- * the shadow-ram devlink region. It captures a snapshot of the shadow ram
- * contents. This snapshot can later be viewed via the devlink-region
- * interface.
- *
- * @returns zero on success, and updates the data pointer. Returns a non-zero
- * error code on failure.
- */
-static int ice_devlink_nvm_snapshot(struct devlink *devlink,
- struct netlink_ext_ack *extack, u8 **data)
-{
- struct ice_pf *pf = devlink_priv(devlink);
- struct device *dev = ice_pf_to_dev(pf);
- struct ice_hw *hw = &pf->hw;
- enum ice_status status;
- void *nvm_data;
- u32 nvm_size;
-
- nvm_size = hw->nvm.flash_size;
- nvm_data = vzalloc(nvm_size);
- if (!nvm_data)
- return -ENOMEM;
-
- status = ice_acquire_nvm(hw, ICE_RES_READ);
- if (status) {
- dev_dbg(dev, "ice_acquire_nvm failed, err %d aq_err %d\n",
- status, hw->adminq.sq_last_status);
- NL_SET_ERR_MSG_MOD(extack, "Failed to acquire NVM semaphore");
- vfree(nvm_data);
- return -EIO;
- }
-
- status = ice_read_flat_nvm(hw, 0, &nvm_size, nvm_data, false);
- if (status) {
- dev_dbg(dev, "ice_read_flat_nvm failed after reading %u bytes, err %d aq_err %d\n",
- nvm_size, status, hw->adminq.sq_last_status);
- NL_SET_ERR_MSG_MOD(extack, "Failed to read NVM contents");
- ice_release_nvm(hw);
- vfree(nvm_data);
- return -EIO;
- }
-
- ice_release_nvm(hw);
-
- *data = nvm_data;
-
- return 0;
-}
-
-static const struct devlink_region_ops ice_nvm_region_ops = {
- .name = "nvm-flash",
- .destructor = vfree,
- .snapshot = ice_devlink_nvm_snapshot,
-};
-
-/**
- * ice_devlink_init_regions - Initialize devlink regions
- * @pf: the PF device structure
- *
- * Create devlink regions used to enable access to dump the contents of the
- * flash memory on the device.
- */
-void ice_devlink_init_regions(struct ice_pf *pf)
-{
- struct devlink *devlink = priv_to_devlink(pf);
- struct device *dev = ice_pf_to_dev(pf);
- u64 nvm_size;
-
- nvm_size = pf->hw.nvm.flash_size;
- pf->nvm_region = devlink_region_create(devlink, &ice_nvm_region_ops, 1,
- nvm_size);
- if (IS_ERR(pf->nvm_region)) {
- dev_err(dev, "failed to create NVM devlink region, err %ld\n",
- PTR_ERR(pf->nvm_region));
- pf->nvm_region = NULL;
- }
-}
-
-/**
- * ice_devlink_destroy_regions - Destroy devlink regions
- * @pf: the PF device structure
- *
- * Remove previously created regions for this PF.
- */
-void ice_devlink_destroy_regions(struct ice_pf *pf)
-{
- if (pf->nvm_region)
- devlink_region_destroy(pf->nvm_region);
-}
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.h b/drivers/net/ethernet/intel/ice/ice_devlink.h
index 6e806a08dc23..f94dc93c24c5 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.h
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.h
@@ -11,7 +11,4 @@ void ice_devlink_unregister(struct ice_pf *pf);
int ice_devlink_create_port(struct ice_pf *pf);
void ice_devlink_destroy_port(struct ice_pf *pf);
-void ice_devlink_init_regions(struct ice_pf *pf);
-void ice_devlink_destroy_regions(struct ice_pf *pf);
-
#endif /* _ICE_DEVLINK_H_ */
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 2b02506d0840..1deffd909a13 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3391,8 +3391,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
goto err_init_pf_unroll;
}
- ice_devlink_init_regions(pf);
-
pf->num_alloc_vsi = hw->func_caps.guar_num_vsi;
if (!pf->num_alloc_vsi) {
err = -EIO;
@@ -3506,7 +3504,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
devm_kfree(dev, pf->vsi);
err_init_pf_unroll:
ice_deinit_pf(pf);
- ice_devlink_destroy_regions(pf);
ice_deinit_hw(hw);
err_exit_unroll:
ice_devlink_unregister(pf);
@@ -3552,7 +3549,6 @@ static void ice_remove(struct pci_dev *pdev)
ice_vsi_free_q_vectors(pf->vsi[i]);
}
ice_deinit_pf(pf);
- ice_devlink_destroy_regions(pf);
ice_deinit_hw(&pf->hw);
ice_devlink_unregister(pf);
--
2.13.6

@ -0,0 +1,105 @@
From 69853c6ef201328562772b4f6adbed11c0cf2168 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:20:02 +0200
Subject: [PATCH 7/7] Revert "[netdrv] ice: let core reject the unsupported
coalescing parameters"
This reverts commit 090b055534b6b2c2a480d8dca667bbd1de6481e9.
---
drivers/net/ethernet/intel/ice/ice_ethtool.c | 59 ++++++++++++++++++++++++++--
1 file changed, 56 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index 2b0aa0afcd1e..0b2ceaf1a53c 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3493,6 +3493,12 @@ ice_set_rc_coalesce(enum ice_container_type c_type, struct ethtool_coalesce *ec,
break;
case ICE_TX_CONTAINER:
+ if (ec->tx_coalesce_usecs_high) {
+ netdev_info(vsi->netdev, "setting %s-usecs-high is not supported\n",
+ c_type_str);
+ return -EINVAL;
+ }
+
use_adaptive_coalesce = ec->use_adaptive_tx_coalesce;
coalesce_usecs = ec->tx_coalesce_usecs;
@@ -3569,6 +3575,53 @@ ice_set_q_coalesce(struct ice_vsi *vsi, struct ethtool_coalesce *ec, int q_num)
}
/**
+ * ice_is_coalesce_param_invalid - check for unsupported coalesce parameters
+ * @netdev: pointer to the netdev associated with this query
+ * @ec: ethtool structure to fill with driver's coalesce settings
+ *
+ * Print netdev info if driver doesn't support one of the parameters
+ * and return error. When any parameters will be implemented, remove only
+ * this parameter from param array.
+ */
+static int
+ice_is_coalesce_param_invalid(struct net_device *netdev,
+ struct ethtool_coalesce *ec)
+{
+ struct ice_ethtool_not_used {
+ u32 value;
+ const char *name;
+ } param[] = {
+ {ec->stats_block_coalesce_usecs, "stats-block-usecs"},
+ {ec->rate_sample_interval, "sample-interval"},
+ {ec->pkt_rate_low, "pkt-rate-low"},
+ {ec->pkt_rate_high, "pkt-rate-high"},
+ {ec->rx_max_coalesced_frames, "rx-frames"},
+ {ec->rx_coalesce_usecs_irq, "rx-usecs-irq"},
+ {ec->rx_max_coalesced_frames_irq, "rx-frames-irq"},
+ {ec->tx_max_coalesced_frames, "tx-frames"},
+ {ec->tx_coalesce_usecs_irq, "tx-usecs-irq"},
+ {ec->tx_max_coalesced_frames_irq, "tx-frames-irq"},
+ {ec->rx_coalesce_usecs_low, "rx-usecs-low"},
+ {ec->rx_max_coalesced_frames_low, "rx-frames-low"},
+ {ec->tx_coalesce_usecs_low, "tx-usecs-low"},
+ {ec->tx_max_coalesced_frames_low, "tx-frames-low"},
+ {ec->rx_max_coalesced_frames_high, "rx-frames-high"},
+ {ec->tx_max_coalesced_frames_high, "tx-frames-high"}
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(param); i++) {
+ if (param[i].value) {
+ netdev_info(netdev, "Setting %s not supported\n",
+ param[i].name);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
+/**
* ice_print_if_odd_usecs - print message if user tries to set odd [tx|rx]-usecs
* @netdev: netdev used for print
* @itr_setting: previous user setting
@@ -3608,6 +3661,9 @@ __ice_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec,
struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_vsi *vsi = np->vsi;
+ if (ice_is_coalesce_param_invalid(netdev, ec))
+ return -EINVAL;
+
if (q_num < 0) {
struct ice_q_vector *q_vector = vsi->q_vectors[0];
int v_idx;
@@ -3802,9 +3858,6 @@ ice_get_module_eeprom(struct net_device *netdev,
}
static const struct ethtool_ops ice_ethtool_ops = {
- .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
- ETHTOOL_COALESCE_USE_ADAPTIVE |
- ETHTOOL_COALESCE_RX_USECS_HIGH,
.get_link_ksettings = ice_get_link_ksettings,
.set_link_ksettings = ice_set_link_ksettings,
.get_drvinfo = ice_get_drvinfo,
--
2.13.6

@ -0,0 +1,56 @@
From 43d21134224146eb018c6a3f12b1baf59c74471d Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:22:40 +0200
Subject: [PATCH 8/9] Revert "[netdrv] ice: Support XDP UMEM wake up mechanism"
This reverts commit 92ce8519e57bd849898ebe505aa7b616c69ae4cd.
---
drivers/net/ethernet/intel/ice/ice_xsk.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c
index ceb2238f5934..12180ea89339 100644
--- a/drivers/net/ethernet/intel/ice/ice_xsk.c
+++ b/drivers/net/ethernet/intel/ice/ice_xsk.c
@@ -937,15 +937,6 @@ int ice_clean_rx_irq_zc(struct ice_ring *rx_ring, int budget)
ice_finalize_xdp_rx(rx_ring, xdp_xmit);
ice_update_rx_ring_stats(rx_ring, total_rx_packets, total_rx_bytes);
- if (xsk_umem_uses_need_wakeup(rx_ring->xsk_umem)) {
- if (failure || rx_ring->next_to_clean == rx_ring->next_to_use)
- xsk_set_rx_need_wakeup(rx_ring->xsk_umem);
- else
- xsk_clear_rx_need_wakeup(rx_ring->xsk_umem);
-
- return (int)total_rx_packets;
- }
-
return failure ? budget : (int)total_rx_packets;
}
@@ -997,8 +988,6 @@ static bool ice_xmit_zc(struct ice_ring *xdp_ring, int budget)
if (tx_desc) {
ice_xdp_ring_update_tail(xdp_ring);
xsk_umem_consume_tx_done(xdp_ring->xsk_umem);
- if (xsk_umem_uses_need_wakeup(xdp_ring->xsk_umem))
- xsk_clear_tx_need_wakeup(xdp_ring->xsk_umem);
}
return budget > 0 && work_done;
@@ -1074,13 +1063,6 @@ bool ice_clean_tx_irq_zc(struct ice_ring *xdp_ring, int budget)
if (xsk_frames)
xsk_umem_complete_tx(xdp_ring->xsk_umem, xsk_frames);
- if (xsk_umem_uses_need_wakeup(xdp_ring->xsk_umem)) {
- if (xdp_ring->next_to_clean == xdp_ring->next_to_use)
- xsk_set_tx_need_wakeup(xdp_ring->xsk_umem);
- else
- xsk_clear_tx_need_wakeup(xdp_ring->xsk_umem);
- }
-
ice_update_tx_ring_stats(xdp_ring, total_packets, total_bytes);
xmit_done = ice_xmit_zc(xdp_ring, ICE_DFLT_IRQ_WORK);
--
2.13.6

@ -0,0 +1,38 @@
From e2de902ac6504aa7f55f4f0a6d918fb897494889 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Thu, 27 Aug 2020 19:22:54 +0200
Subject: [PATCH 9/9] Revert "[net] xsk: ixgbe: i40e: ice: mlx5:
Xsk_umem_discard_addr to xsk_umem_release_addr"
This reverts commit 82059837017b623b919a5f01059dbcda667dbe5d.
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++--
drivers/net/ethernet/intel/ice/ice_xsk.c | 4 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 2 +-
include/net/xdp_sock.h | 10 +++++-----
net/xdp/xsk.c | 4 ++--
6 files changed, 14 insertions(+), 14 deletions(-)
Index: src/drivers/net/ethernet/intel/ice/ice_xsk.c
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_xsk.c 2020-08-27 19:23:52.371064612 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_xsk.c 2020-08-27 19:23:52.380064621 +0200
@@ -556,7 +556,7 @@
rx_buf->handle = handle + umem->headroom;
- xsk_umem_release_addr(umem);
+ xsk_umem_discard_addr(umem);
return true;
}
@@ -592,7 +592,7 @@
rx_buf->handle = handle + umem->headroom;
- xsk_umem_release_addr_rq(umem);
+ xsk_umem_discard_addr_rq(umem);
return true;
}

@ -0,0 +1,13 @@
Index: src/drivers/net/ethernet/intel/ice/ice_main.c
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 18:16:01.011305817 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 18:38:23.737500241 +0200
@@ -19,7 +19,7 @@
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
__stringify(DRV_VERSION_MINOR) "." \
- __stringify(DRV_VERSION_BUILD) "-k"
+ __stringify(DRV_VERSION_BUILD) "-k_dup8.2"
#define DRV_SUMMARY "Intel(R) Ethernet Connection E800 Series Linux Driver"
const char ice_drv_ver[] = DRV_VERSION;
static const char ice_driver_string[] = DRV_SUMMARY;

@ -0,0 +1,13 @@
Index: src/drivers/net/ethernet/intel/ice/ice_main.c
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 18:38:23.737500241 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 18:39:16.839544553 +0200
@@ -27,7 +27,7 @@
/* DDP Package file located in firmware search paths (e.g. /lib/firmware/) */
#define ICE_DDP_PKG_PATH "intel/ice/ddp/"
-#define ICE_DDP_PKG_FILE ICE_DDP_PKG_PATH "ice.pkg"
+#define ICE_DDP_PKG_FILE ICE_DDP_PKG_PATH "ice-1.3.4.0_dup8.2.pkg"
MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>");
MODULE_DESCRIPTION(DRV_SUMMARY);

@ -0,0 +1,10 @@
Index: src/drivers/net/ethernet/intel/ice/ice_backport_compat.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ src/drivers/net/ethernet/intel/ice/ice_backport_compat.h 2020-08-27 18:55:51.725461825 +0200
@@ -0,0 +1,5 @@
+#ifndef ICE_BACKPORT_COMPAT_H
+#define ICE_BACKPORT_COMPAT_H
+
+
+#endif /* ICE_BACKPORT_COMPAT_H */

@ -0,0 +1,71 @@
Index: src/drivers/net/ethernet/intel/ice/ice_backport_compat.h
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_backport_compat.h 2020-08-27 19:25:24.269152253 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_backport_compat.h 2020-08-27 23:44:51.384511148 +0200
@@ -1,5 +1,40 @@
#ifndef ICE_BACKPORT_COMPAT_H
#define ICE_BACKPORT_COMPAT_H
+#include <linux/pci.h>
+
+/**
+ * pci_get_dsn - Read and return the 8-byte Device Serial Number
+ * @dev: PCI device to query
+ *
+ * Looks up the PCI_EXT_CAP_ID_DSN and reads the 8 bytes of the Device Serial
+ * Number.
+ *
+ * Returns the DSN, or zero if the capability does not exist.
+ */
+static inline u64 pci_get_dsn(struct pci_dev *dev)
+{
+ u32 dword;
+ u64 dsn;
+ int pos;
+
+ pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DSN);
+ if (!pos)
+ return 0;
+
+ /*
+ * The Device Serial Number is two dwords offset 4 bytes from the
+ * capability position. The specification says that the first dword is
+ * the lower half, and the second dword is the upper half.
+ */
+ pos += 4;
+ pci_read_config_dword(dev, pos, &dword);
+ dsn = (u64)dword;
+ pci_read_config_dword(dev, pos + 4, &dword);
+ dsn |= ((u64)dword) << 32;
+
+ return dsn;
+}
+
#endif /* ICE_BACKPORT_COMPAT_H */
Index: src/drivers/net/ethernet/intel/ice/ice_main.c
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 19:25:24.221152207 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 23:41:52.364425785 +0200
@@ -13,6 +13,8 @@
#include "ice_dcb_nl.h"
#include "ice_devlink.h"
+#include "ice_backport_compat.h"
+
#define DRV_VERSION_MAJOR 0
#define DRV_VERSION_MINOR 8
#define DRV_VERSION_BUILD 2
Index: src/drivers/net/ethernet/intel/ice/ice_devlink.c
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_devlink.c 2020-08-27 19:25:23.959151957 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_devlink.c 2020-08-27 19:25:24.319152301 +0200
@@ -5,6 +5,8 @@
#include "ice_lib.h"
#include "ice_devlink.h"
+#include "ice_backport_compat.h"
+
static int ice_info_get_dsn(struct ice_pf *pf, char *buf, size_t len)
{
u8 dsn[8];

@ -0,0 +1,52 @@
Index: src/drivers/net/ethernet/intel/ice/ice_backport_compat.h
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_backport_compat.h 2020-08-27 23:41:54.067426597 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_backport_compat.h 2020-08-27 23:44:20.729496531 +0200
@@ -37,4 +37,47 @@
}
+static inline struct pci_bus *find_pci_root_bus_dup(struct pci_bus *bus)
+{
+ while (bus->parent)
+ bus = bus->parent;
+
+ return bus;
+}
+
+static inline struct pci_host_bridge *pci_find_host_bridge_dup(struct pci_bus *bus)
+{
+ struct pci_bus *root_bus = find_pci_root_bus_dup(bus);
+
+ return to_pci_host_bridge(root_bus->bridge);
+}
+
+static inline int pcie_aer_is_native(struct pci_dev *dev)
+{
+ struct pci_host_bridge *host = pci_find_host_bridge_dup(dev->bus);
+
+ if (!dev->aer_cap)
+ return 0;
+
+ return /* pcie_ports_native || */ host->native_aer;
+}
+
+static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev)
+{
+ int aer = dev->aer_cap;
+ u32 status, sev;
+
+ if (!pcie_aer_is_native(dev))
+ return -EIO;
+
+ /* Clear status bits for ERR_NONFATAL errors only */
+ pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status);
+ pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, &sev);
+ status &= ~sev;
+ if (status)
+ pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status);
+
+ return 0;
+}
+
#endif /* ICE_BACKPORT_COMPAT_H */

@ -0,0 +1,13 @@
Index: src/drivers/net/ethernet/intel/ice/ice_main.c
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 23:46:40.953573593 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_main.c 2020-08-27 23:46:40.975573609 +0200
@@ -5770,7 +5770,7 @@
.ndo_tx_timeout = ice_tx_timeout,
.ndo_bpf = ice_xdp,
.ndo_xdp_xmit = ice_xdp_xmit,
- .ndo_xsk_wakeup = ice_xsk_wakeup,
+ /* .ndo_xsk_wakeup = ice_xsk_wakeup, */
.ndo_udp_tunnel_add = ice_udp_tunnel_add,
.ndo_udp_tunnel_del = ice_udp_tunnel_del,
};

@ -0,0 +1,12 @@
Index: src/drivers/net/ethernet/intel/ice/ice_backport_compat.h
===================================================================
--- src.orig/drivers/net/ethernet/intel/ice/ice_backport_compat.h 2020-08-27 23:46:58.998586500 +0200
+++ src/drivers/net/ethernet/intel/ice/ice_backport_compat.h 2020-08-27 23:47:13.889597151 +0200
@@ -80,4 +80,7 @@
return 0;
}
+
+#define DEVLINK_INFO_VERSION_GENERIC_FW_BUNDLE_ID "fw.bundle_id"
+
#endif /* ICE_BACKPORT_COMPAT_H */

@ -0,0 +1,326 @@
%define kmod_name ice
%define kmod_vendor redhat
%define kmod_rpm_name kmod-redhat-ice
%define kmod_driver_version 0.8.2_k_dup8.2
%define kmod_driver_epoch %{nil}
%define kmod_rpm_release 1
%define kmod_kernel_version 4.18.0-193.el8
%define kmod_kernel_version_min %{nil}
%define kmod_kernel_version_dep %{nil}
%define kmod_kbuild_dir drivers/net/ethernet/intel/ice
%define kmod_dependencies %{nil}
%define kmod_dist_build_deps %{nil}
%define kmod_build_dependencies %{nil}
%define kmod_devel_package 0
%define kmod_devel_src_paths %{nil}
%define kmod_install_path extra/kmod-redhat-ice
%define kernel_pkg kernel
%define kernel_devel_pkg kernel-devel
%define kernel_modules_pkg kernel-modules
%{!?dist: %define dist .el8_2}
%{!?make_build: %define make_build make}
%if "%{kmod_kernel_version_dep}" == ""
%define kmod_kernel_version_dep %{kmod_kernel_version}
%endif
%if "%{kmod_dist_build_deps}" == ""
%if (0%{?rhel} > 7) || (0%{?centos} > 7)
%define kmod_dist_build_deps redhat-rpm-config kernel-abi-whitelists elfutils-libelf-devel kernel-rpm-macros kmod
%else
%define kmod_dist_build_deps redhat-rpm-config kernel-abi-whitelists
%endif
%endif
Source0: %{kmod_name}-%{kmod_vendor}-%{kmod_driver_version}.tar.bz2
# Source code patches
Patch0: 0001-Revert-netdrv-ice-Don-t-reset-and-rebuild-for-Tx-tim.patch
Patch1: 0002-Revert-netdrv-ice-Fix-format-specifier.patch
Patch2: 0003-Revert-netdrv-ice-add-function-argument-description-.patch
Patch3: 0004-Revert-netdrv-ice-Removing-hung_queue-variable-to-us.patch
Patch4: 0005-Revert-netdev-pass-the-stuck-queue-to-the-timeout-ha.patch
Patch5: 0006-Revert-netdrv-ice-add-a-devlink-region-for-dumping-N.patch
Patch6: 0007-Revert-netdrv-ice-let-core-reject-the-unsupported-co.patch
Patch7: 0008-Revert-netdrv-ice-Support-XDP-UMEM-wake-up-mechanism.patch
Patch8: 0009-Revert-net-xsk-ixgbe-i40e-ice-mlx5-Xsk_umem_discard_.patch
Patch9: 9000-bump-driver-version.patch
Patch10: 9001-change-fw-name.patch
Patch11: 9002-add-backport_compat.patch
Patch12: 9003-add-pci_get_dsn.patch
Patch13: 9004-add-pci_aer_clear_nonfatal_status.patch
Patch14: 9005-remove-ndo_xsk_wakeup.patch
Patch15: 9006-add-DEVLINK_INFO_VERSION_GENERIC_FW_BUNDLE_ID.patch
%define findpat %( echo "%""P" )
%define __find_requires /usr/lib/rpm/redhat/find-requires.ksyms
%define __find_provides /usr/lib/rpm/redhat/find-provides.ksyms %{kmod_name} %{?epoch:%{epoch}:}%{version}-%{release}
%define sbindir %( if [ -d "/sbin" -a \! -h "/sbin" ]; then echo "/sbin"; else echo %{_sbindir}; fi )
%define dup_state_dir %{_localstatedir}/lib/rpm-state/kmod-dups
%define kver_state_dir %{dup_state_dir}/kver
%define kver_state_file %{kver_state_dir}/%{kmod_kernel_version}.%(arch)
%define dup_module_list %{dup_state_dir}/rpm-kmod-%{kmod_name}-modules
Name: kmod-redhat-ice
Version: %{kmod_driver_version}
Release: %{kmod_rpm_release}%{?dist}
%if "%{kmod_driver_epoch}" != ""
Epoch: %{kmod_driver_epoch}
%endif
Summary: ice kernel module for Driver Update Program
Group: System/Kernel
License: GPLv2
URL: https://www.kernel.org/
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: %kernel_devel_pkg = %kmod_kernel_version
%if "%{kmod_dist_build_deps}" != ""
BuildRequires: %{kmod_dist_build_deps}
%endif
ExclusiveArch: x86_64
%global kernel_source() /usr/src/kernels/%{kmod_kernel_version}.$(arch)
%global _use_internal_dependency_generator 0
%if "%{?kmod_kernel_version_min}" != ""
Provides: %kernel_modules_pkg >= %{kmod_kernel_version_min}.%{_target_cpu}
%else
Provides: %kernel_modules_pkg = %{kmod_kernel_version_dep}.%{_target_cpu}
%endif
Provides: kmod-%{kmod_name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires(post): %{sbindir}/weak-modules
Requires(postun): %{sbindir}/weak-modules
Requires: kernel >= 4.18.0-193.el8
Requires: kernel < 4.18.0-194.el8
%if 1
Requires: firmware(%{kmod_name}) = 1.3.4.0_dup8.2
%endif
%if "%{kmod_build_dependencies}" != ""
BuildRequires: %{kmod_build_dependencies}
%endif
%if "%{kmod_dependencies}" != ""
Requires: %{kmod_dependencies}
%endif
# if there are multiple kmods for the same driver from different vendors,
# they should conflict with each other.
Conflicts: kmod-%{kmod_name}
%description
ice kernel module for Driver Update Program
%if 1
%package -n kmod-redhat-ice-firmware
Version: 1.3.4.0_dup8.2
Summary: ice firmware for Driver Update Program
Provides: firmware(%{kmod_name}) = 1.3.4.0_dup8.2
%if "%{kmod_kernel_version_min}" != ""
Provides: %kernel_modules_pkg >= %{kmod_kernel_version_min}.%{_target_cpu}
%else
Provides: %kernel_modules_pkg = %{kmod_kernel_version_dep}.%{_target_cpu}
%endif
%description -n kmod-redhat-ice-firmware
ice firmware for Driver Update Program
%files -n kmod-redhat-ice-firmware
%defattr(644,root,root,755)
/lib/firmware/intel/ice/ddp/ice-1.3.4.0_dup8.2.pkg
%endif
# Development package
%if 0%{kmod_devel_package}
%package -n kmod-redhat-ice-devel
Version: %{kmod_driver_version}
Requires: kernel >= 4.18.0-193.el8
Requires: kernel < 4.18.0-194.el8
Summary: ice development files for Driver Update Program
%description -n kmod-redhat-ice-devel
ice development files for Driver Update Program
%files -n kmod-redhat-ice-devel
%defattr(644,root,root,755)
/lib/modules/%{kmod_rpm_name}-%{kmod_driver_version}/
%endif
%post
modules=( $(find /lib/modules/%{kmod_kernel_version}.%(arch)/%{kmod_install_path} | grep '\.ko$') )
printf '%s\n' "${modules[@]}" | %{sbindir}/weak-modules --add-modules --no-initramfs
mkdir -p "%{kver_state_dir}"
touch "%{kver_state_file}"
exit 0
%posttrans
# We have to re-implement part of weak-modules here because it doesn't allow
# calling initramfs regeneration separately
if [ -f "%{kver_state_file}" ]; then
kver_base="%{kmod_kernel_version_dep}"
kvers=$(ls -d "/lib/modules/${kver_base%%.*}"*)
for k_dir in $kvers; do
k="${k_dir#/lib/modules/}"
tmp_initramfs="/boot/initramfs-$k.tmp"
dst_initramfs="/boot/initramfs-$k.img"
# The same check as in weak-modules: we assume that the kernel present
# if the symvers file exists.
if [ -e "/boot/symvers-$k.gz" ]; then
/usr/bin/dracut -f "$tmp_initramfs" "$k" || exit 1
cmp -s "$tmp_initramfs" "$dst_initramfs"
if [ "$?" = 1 ]; then
mv "$tmp_initramfs" "$dst_initramfs"
else
rm -f "$tmp_initramfs"
fi
fi
done
rm -f "%{kver_state_file}"
rmdir "%{kver_state_dir}" 2> /dev/null
fi
rmdir "%{dup_state_dir}" 2> /dev/null
exit 0
%preun
if rpm -q --filetriggers kmod 2> /dev/null| grep -q "Trigger for weak-modules call on kmod removal"; then
mkdir -p "%{kver_state_dir}"
touch "%{kver_state_file}"
fi
mkdir -p "%{dup_state_dir}"
rpm -ql kmod-redhat-ice-%{kmod_driver_version}-%{kmod_rpm_release}%{?dist}.$(arch) | \
grep '\.ko$' > "%{dup_module_list}"
%postun
if rpm -q --filetriggers kmod 2> /dev/null| grep -q "Trigger for weak-modules call on kmod removal"; then
initramfs_opt="--no-initramfs"
else
initramfs_opt=""
fi
modules=( $(cat "%{dup_module_list}") )
rm -f "%{dup_module_list}"
printf '%s\n' "${modules[@]}" | %{sbindir}/weak-modules --remove-modules $initramfs_opt
rmdir "%{dup_state_dir}" 2> /dev/null
exit 0
%files
%defattr(644,root,root,755)
/lib/modules/%{kmod_kernel_version}.%(arch)
/etc/depmod.d/%{kmod_name}.conf
%doc /usr/share/doc/%{kmod_rpm_name}/greylist.txt
%prep
%setup -n %{kmod_name}-%{kmod_vendor}-%{kmod_driver_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
set -- *
mkdir source
mv "$@" source/
mkdir obj
%build
rm -rf obj
cp -r source obj
PWD_PATH="$PWD"
%if "%{workaround_no_pwd_rel_path}" != "1"
PWD_PATH=$(realpath --relative-to="%{kernel_source}" . 2>/dev/null || echo "$PWD")
%endif
%{make_build} -C %{kernel_source} V=1 M="$PWD_PATH/obj/%{kmod_kbuild_dir}" \
NOSTDINC_FLAGS="-I$PWD_PATH/obj/include -I$PWD_PATH/obj/include/uapi %{nil}" \
EXTRA_CFLAGS="%{nil}" \
%{nil}
# mark modules executable so that strip-to-file can strip them
find obj/%{kmod_kbuild_dir} -name "*.ko" -type f -exec chmod u+x '{}' +
whitelist="/lib/modules/kabi-current/kabi_whitelist_%{_target_cpu}"
for modules in $( find obj/%{kmod_kbuild_dir} -name "*.ko" -type f -printf "%{findpat}\n" | sed 's|\.ko$||' | sort -u ) ; do
# update depmod.conf
module_weak_path=$(echo "$modules" | sed 's/[\/]*[^\/]*$//')
if [ -z "$module_weak_path" ]; then
module_weak_path=%{name}
else
module_weak_path=%{name}/$module_weak_path
fi
echo "override $(echo $modules | sed 's/.*\///')" \
"$(echo "%{kmod_kernel_version_dep}" |
sed 's/\.[^\.]*$//;
s/\([.+?^$\/\\|()\[]\|\]\)/\\\0/g').*" \
"weak-updates/$module_weak_path" >> source/depmod.conf
# update greylist
nm -u obj/%{kmod_kbuild_dir}/$modules.ko | sed 's/.*U //' | sed 's/^\.//' | sort -u | while read -r symbol; do
grep -q "^\s*$symbol\$" $whitelist || echo "$symbol" >> source/greylist
done
done
sort -u source/greylist | uniq > source/greylist.txt
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=%{kmod_install_path}
PWD_PATH="$PWD"
%if "%{workaround_no_pwd_rel_path}" != "1"
PWD_PATH=$(realpath --relative-to="%{kernel_source}" . 2>/dev/null || echo "$PWD")
%endif
make -C %{kernel_source} modules_install \
M=$PWD_PATH/obj/%{kmod_kbuild_dir}
# Cleanup unnecessary kernel-generated module dependency files.
find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm {} \;
install -m 644 -D source/depmod.conf $RPM_BUILD_ROOT/etc/depmod.d/%{kmod_name}.conf
install -m 644 -D source/greylist.txt $RPM_BUILD_ROOT/usr/share/doc/%{kmod_rpm_name}/greylist.txt
%if 1
install -m 644 -D source/firmware/intel/ice/ddp/ice-1.3.4.0_dup8.2.pkg $RPM_BUILD_ROOT/lib/firmware/intel/ice/ddp/ice-1.3.4.0_dup8.2.pkg
%endif
%if 0%{kmod_devel_package}
install -m 644 -D $PWD/obj/%{kmod_kbuild_dir}/Module.symvers $RPM_BUILD_ROOT/lib/modules/%{kmod_rpm_name}-%{kmod_driver_version}/build/Module.symvers
if [ -n "%{kmod_devel_src_paths}" ]; then
for i in %{kmod_devel_src_paths}; do
mkdir -p "$RPM_BUILD_ROOT/lib/modules/%{kmod_rpm_name}-%{kmod_driver_version}/build/$(dirname "$i")"
cp -rv "$PWD/source/$i" \
"$RPM_BUILD_ROOT/lib/modules/%{kmod_rpm_name}-%{kmod_driver_version}/build/$i"
done
fi
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Oct 21 2020 Eugene Syromiatnikov <esyr@redhat.com> 0.8.2_k_dup8.2-1
- afe1694503958c189ab98273de137c65bc3909f8
- ice kernel module for Driver Update Program
- Resolves: #bz1875784
Loading…
Cancel
Save