aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/caif/caif_hsi.c2
-rw-r--r--drivers/net/ethernet/atheros/ag71xx.c9
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl1.c2
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl2.c1
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c9
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.c57
-rw-r--r--drivers/net/ethernet/cavium/liquidio/request_manager.c6
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/sched.c1
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c6
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c2
-rw-r--r--drivers/net/ethernet/google/gve/gve_main.c23
-rw-r--r--drivers/net/ethernet/google/gve/gve_rx.c4
-rw-r--r--drivers/net/ethernet/jme.c5
-rw-r--r--drivers/net/ethernet/marvell/skge.c2
-rw-r--r--drivers/net/ethernet/marvell/sky2.c7
-rw-r--r--drivers/net/ethernet/mediatek/mtk_eth_soc.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/eq.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tc.c13
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.c1
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/health.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/pci.c1
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h1
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c16
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c10
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c6
-rw-r--r--drivers/net/ethernet/mscc/ocelot_board.c5
-rw-r--r--drivers/net/ethernet/neterion/s2io.c1
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c3
-rw-r--r--drivers/net/ethernet/realtek/r8169_main.c137
-rw-r--r--drivers/net/ethernet/sis/sis900.c6
-rw-r--r--drivers/net/ethernet/ti/cpsw.c26
-rw-r--r--drivers/net/ethernet/ti/tlan.c1
-rw-r--r--drivers/net/hippi/rrunner.c2
-rw-r--r--drivers/net/usb/qmi_wwan.c1
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c1
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/cfg/22000.c53
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-config.h7
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-csr.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/drv.c23
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2x00usb.c12
42 files changed, 357 insertions, 120 deletions
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index b2f10b6ad6e5..bbb2575d4728 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -1455,7 +1455,7 @@ static void __exit cfhsi_exit_module(void)
1455 rtnl_lock(); 1455 rtnl_lock();
1456 list_for_each_safe(list_node, n, &cfhsi_list) { 1456 list_for_each_safe(list_node, n, &cfhsi_list) {
1457 cfhsi = list_entry(list_node, struct cfhsi, list); 1457 cfhsi = list_entry(list_node, struct cfhsi, list);
1458 unregister_netdev(cfhsi->ndev); 1458 unregister_netdevice(cfhsi->ndev);
1459 } 1459 }
1460 rtnl_unlock(); 1460 rtnl_unlock();
1461} 1461}
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index 72a57c6cd254..8b69d0d7e726 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -35,6 +35,7 @@
35#include <linux/regmap.h> 35#include <linux/regmap.h>
36#include <linux/reset.h> 36#include <linux/reset.h>
37#include <linux/clk.h> 37#include <linux/clk.h>
38#include <linux/io.h>
38 39
39/* For our NAPI weight bigger does *NOT* mean better - it means more 40/* For our NAPI weight bigger does *NOT* mean better - it means more
40 * D-cache misses and lots more wasted cycles than we'll ever 41 * D-cache misses and lots more wasted cycles than we'll ever
@@ -1724,17 +1725,19 @@ static int ag71xx_probe(struct platform_device *pdev)
1724 ag->stop_desc = dmam_alloc_coherent(&pdev->dev, 1725 ag->stop_desc = dmam_alloc_coherent(&pdev->dev,
1725 sizeof(struct ag71xx_desc), 1726 sizeof(struct ag71xx_desc),
1726 &ag->stop_desc_dma, GFP_KERNEL); 1727 &ag->stop_desc_dma, GFP_KERNEL);
1727 if (!ag->stop_desc) 1728 if (!ag->stop_desc) {
1729 err = -ENOMEM;
1728 goto err_free; 1730 goto err_free;
1731 }
1729 1732
1730 ag->stop_desc->data = 0; 1733 ag->stop_desc->data = 0;
1731 ag->stop_desc->ctrl = 0; 1734 ag->stop_desc->ctrl = 0;
1732 ag->stop_desc->next = (u32)ag->stop_desc_dma; 1735 ag->stop_desc->next = (u32)ag->stop_desc_dma;
1733 1736
1734 mac_addr = of_get_mac_address(np); 1737 mac_addr = of_get_mac_address(np);
1735 if (mac_addr) 1738 if (!IS_ERR(mac_addr))
1736 memcpy(ndev->dev_addr, mac_addr, ETH_ALEN); 1739 memcpy(ndev->dev_addr, mac_addr, ETH_ALEN);
1737 if (!mac_addr || !is_valid_ether_addr(ndev->dev_addr)) { 1740 if (IS_ERR(mac_addr) || !is_valid_ether_addr(ndev->dev_addr)) {
1738 netif_err(ag, probe, ndev, "invalid MAC address, using random address\n"); 1741 netif_err(ag, probe, ndev, "invalid MAC address, using random address\n");
1739 eth_random_addr(ndev->dev_addr); 1742 eth_random_addr(ndev->dev_addr);
1740 } 1743 }
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 7c767ce9aafa..b5c6dc914720 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -1060,8 +1060,6 @@ static s32 atl1_setup_ring_resources(struct atl1_adapter *adapter)
1060 goto err_nomem; 1060 goto err_nomem;
1061 } 1061 }
1062 1062
1063 memset(ring_header->desc, 0, ring_header->size);
1064
1065 /* init TPD ring */ 1063 /* init TPD ring */
1066 tpd_ring->dma = ring_header->dma; 1064 tpd_ring->dma = ring_header->dma;
1067 offset = (tpd_ring->dma & 0x7) ? (8 - (ring_header->dma & 0x7)) : 0; 1065 offset = (tpd_ring->dma & 0x7) ? (8 - (ring_header->dma & 0x7)) : 0;
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index 3a3fb5ce0fee..3aba38322717 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -291,7 +291,6 @@ static s32 atl2_setup_ring_resources(struct atl2_adapter *adapter)
291 &adapter->ring_dma); 291 &adapter->ring_dma);
292 if (!adapter->ring_vir_addr) 292 if (!adapter->ring_vir_addr)
293 return -ENOMEM; 293 return -ENOMEM;
294 memset(adapter->ring_vir_addr, 0, adapter->ring_size);
295 294
296 /* Init TXD Ring */ 295 /* Init TXD Ring */
297 adapter->txd_dma = adapter->ring_dma ; 296 adapter->txd_dma = adapter->ring_dma ;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 3f632028eff0..7134d2c3eb1c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2677,8 +2677,6 @@ static int bnxt_alloc_tx_rings(struct bnxt *bp)
2677 mapping = txr->tx_push_mapping + 2677 mapping = txr->tx_push_mapping +
2678 sizeof(struct tx_push_bd); 2678 sizeof(struct tx_push_bd);
2679 txr->data_mapping = cpu_to_le64(mapping); 2679 txr->data_mapping = cpu_to_le64(mapping);
2680
2681 memset(txr->tx_push, 0, sizeof(struct tx_push_bd));
2682 } 2680 }
2683 qidx = bp->tc_to_qidx[j]; 2681 qidx = bp->tc_to_qidx[j];
2684 ring->queue_id = bp->q_info[qidx].queue_id; 2682 ring->queue_id = bp->q_info[qidx].queue_id;
@@ -3077,7 +3075,7 @@ static int bnxt_alloc_vnics(struct bnxt *bp)
3077 int num_vnics = 1; 3075 int num_vnics = 1;
3078 3076
3079#ifdef CONFIG_RFS_ACCEL 3077#ifdef CONFIG_RFS_ACCEL
3080 if (bp->flags & BNXT_FLAG_RFS) 3078 if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS)
3081 num_vnics += bp->rx_nr_rings; 3079 num_vnics += bp->rx_nr_rings;
3082#endif 3080#endif
3083 3081
@@ -7188,6 +7186,9 @@ static int bnxt_alloc_rfs_vnics(struct bnxt *bp)
7188#ifdef CONFIG_RFS_ACCEL 7186#ifdef CONFIG_RFS_ACCEL
7189 int i, rc = 0; 7187 int i, rc = 0;
7190 7188
7189 if (bp->flags & BNXT_FLAG_CHIP_P5)
7190 return 0;
7191
7191 for (i = 0; i < bp->rx_nr_rings; i++) { 7192 for (i = 0; i < bp->rx_nr_rings; i++) {
7192 struct bnxt_vnic_info *vnic; 7193 struct bnxt_vnic_info *vnic;
7193 u16 vnic_id = i + 1; 7194 u16 vnic_id = i + 1;
@@ -9647,7 +9648,7 @@ int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs,
9647 return -ENOMEM; 9648 return -ENOMEM;
9648 9649
9649 vnics = 1; 9650 vnics = 1;
9650 if (bp->flags & BNXT_FLAG_RFS) 9651 if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS)
9651 vnics += rx_rings; 9652 vnics += rx_rings;
9652 9653
9653 if (bp->flags & BNXT_FLAG_AGG_RINGS) 9654 if (bp->flags & BNXT_FLAG_AGG_RINGS)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 34466b827dde..a2b57807453b 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3083,39 +3083,42 @@ static void bcmgenet_timeout(struct net_device *dev)
3083 netif_tx_wake_all_queues(dev); 3083 netif_tx_wake_all_queues(dev);
3084} 3084}
3085 3085
3086#define MAX_MC_COUNT 16 3086#define MAX_MDF_FILTER 17
3087 3087
3088static inline void bcmgenet_set_mdf_addr(struct bcmgenet_priv *priv, 3088static inline void bcmgenet_set_mdf_addr(struct bcmgenet_priv *priv,
3089 unsigned char *addr, 3089 unsigned char *addr,
3090 int *i, 3090 int *i)
3091 int *mc)
3092{ 3091{
3093 u32 reg;
3094
3095 bcmgenet_umac_writel(priv, addr[0] << 8 | addr[1], 3092 bcmgenet_umac_writel(priv, addr[0] << 8 | addr[1],
3096 UMAC_MDF_ADDR + (*i * 4)); 3093 UMAC_MDF_ADDR + (*i * 4));
3097 bcmgenet_umac_writel(priv, addr[2] << 24 | addr[3] << 16 | 3094 bcmgenet_umac_writel(priv, addr[2] << 24 | addr[3] << 16 |
3098 addr[4] << 8 | addr[5], 3095 addr[4] << 8 | addr[5],
3099 UMAC_MDF_ADDR + ((*i + 1) * 4)); 3096 UMAC_MDF_ADDR + ((*i + 1) * 4));
3100 reg = bcmgenet_umac_readl(priv, UMAC_MDF_CTRL);
3101 reg |= (1 << (MAX_MC_COUNT - *mc));
3102 bcmgenet_umac_writel(priv, reg, UMAC_MDF_CTRL);
3103 *i += 2; 3097 *i += 2;
3104 (*mc)++;
3105} 3098}
3106 3099
3107static void bcmgenet_set_rx_mode(struct net_device *dev) 3100static void bcmgenet_set_rx_mode(struct net_device *dev)
3108{ 3101{
3109 struct bcmgenet_priv *priv = netdev_priv(dev); 3102 struct bcmgenet_priv *priv = netdev_priv(dev);
3110 struct netdev_hw_addr *ha; 3103 struct netdev_hw_addr *ha;
3111 int i, mc; 3104 int i, nfilter;
3112 u32 reg; 3105 u32 reg;
3113 3106
3114 netif_dbg(priv, hw, dev, "%s: %08X\n", __func__, dev->flags); 3107 netif_dbg(priv, hw, dev, "%s: %08X\n", __func__, dev->flags);
3115 3108
3116 /* Promiscuous mode */ 3109 /* Number of filters needed */
3110 nfilter = netdev_uc_count(dev) + netdev_mc_count(dev) + 2;
3111
3112 /*
3113 * Turn on promicuous mode for three scenarios
3114 * 1. IFF_PROMISC flag is set
3115 * 2. IFF_ALLMULTI flag is set
3116 * 3. The number of filters needed exceeds the number filters
3117 * supported by the hardware.
3118 */
3117 reg = bcmgenet_umac_readl(priv, UMAC_CMD); 3119 reg = bcmgenet_umac_readl(priv, UMAC_CMD);
3118 if (dev->flags & IFF_PROMISC) { 3120 if ((dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) ||
3121 (nfilter > MAX_MDF_FILTER)) {
3119 reg |= CMD_PROMISC; 3122 reg |= CMD_PROMISC;
3120 bcmgenet_umac_writel(priv, reg, UMAC_CMD); 3123 bcmgenet_umac_writel(priv, reg, UMAC_CMD);
3121 bcmgenet_umac_writel(priv, 0, UMAC_MDF_CTRL); 3124 bcmgenet_umac_writel(priv, 0, UMAC_MDF_CTRL);
@@ -3125,32 +3128,24 @@ static void bcmgenet_set_rx_mode(struct net_device *dev)
3125 bcmgenet_umac_writel(priv, reg, UMAC_CMD); 3128 bcmgenet_umac_writel(priv, reg, UMAC_CMD);
3126 } 3129 }
3127 3130
3128 /* UniMac doesn't support ALLMULTI */
3129 if (dev->flags & IFF_ALLMULTI) {
3130 netdev_warn(dev, "ALLMULTI is not supported\n");
3131 return;
3132 }
3133
3134 /* update MDF filter */ 3131 /* update MDF filter */
3135 i = 0; 3132 i = 0;
3136 mc = 0;
3137 /* Broadcast */ 3133 /* Broadcast */
3138 bcmgenet_set_mdf_addr(priv, dev->broadcast, &i, &mc); 3134 bcmgenet_set_mdf_addr(priv, dev->broadcast, &i);
3139 /* my own address.*/ 3135 /* my own address.*/
3140 bcmgenet_set_mdf_addr(priv, dev->dev_addr, &i, &mc); 3136 bcmgenet_set_mdf_addr(priv, dev->dev_addr, &i);
3141 /* Unicast list*/
3142 if (netdev_uc_count(dev) > (MAX_MC_COUNT - mc))
3143 return;
3144 3137
3145 if (!netdev_uc_empty(dev)) 3138 /* Unicast */
3146 netdev_for_each_uc_addr(ha, dev) 3139 netdev_for_each_uc_addr(ha, dev)
3147 bcmgenet_set_mdf_addr(priv, ha->addr, &i, &mc); 3140 bcmgenet_set_mdf_addr(priv, ha->addr, &i);
3148 /* Multicast */
3149 if (netdev_mc_empty(dev) || netdev_mc_count(dev) >= (MAX_MC_COUNT - mc))
3150 return;
3151 3141
3142 /* Multicast */
3152 netdev_for_each_mc_addr(ha, dev) 3143 netdev_for_each_mc_addr(ha, dev)
3153 bcmgenet_set_mdf_addr(priv, ha->addr, &i, &mc); 3144 bcmgenet_set_mdf_addr(priv, ha->addr, &i);
3145
3146 /* Enable filters */
3147 reg = GENMASK(MAX_MDF_FILTER - 1, MAX_MDF_FILTER - nfilter);
3148 bcmgenet_umac_writel(priv, reg, UMAC_MDF_CTRL);
3154} 3149}
3155 3150
3156/* Set the hardware MAC address. */ 3151/* Set the hardware MAC address. */
diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
index fcf20a8f92d9..032224178b64 100644
--- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
+++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
@@ -218,15 +218,13 @@ int octeon_setup_iq(struct octeon_device *oct,
218 return 0; 218 return 0;
219 } 219 }
220 oct->instr_queue[iq_no] = 220 oct->instr_queue[iq_no] =
221 vmalloc_node(sizeof(struct octeon_instr_queue), numa_node); 221 vzalloc_node(sizeof(struct octeon_instr_queue), numa_node);
222 if (!oct->instr_queue[iq_no]) 222 if (!oct->instr_queue[iq_no])
223 oct->instr_queue[iq_no] = 223 oct->instr_queue[iq_no] =
224 vmalloc(sizeof(struct octeon_instr_queue)); 224 vzalloc(sizeof(struct octeon_instr_queue));
225 if (!oct->instr_queue[iq_no]) 225 if (!oct->instr_queue[iq_no])
226 return 1; 226 return 1;
227 227
228 memset(oct->instr_queue[iq_no], 0,
229 sizeof(struct octeon_instr_queue));
230 228
231 oct->instr_queue[iq_no]->q_index = q_index; 229 oct->instr_queue[iq_no]->q_index = q_index;
232 oct->instr_queue[iq_no]->app_ctx = app_ctx; 230 oct->instr_queue[iq_no]->app_ctx = app_ctx;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sched.c b/drivers/net/ethernet/chelsio/cxgb4/sched.c
index ba6c153ee45c..60218dc676a8 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sched.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sched.c
@@ -207,7 +207,6 @@ static int t4_sched_queue_bind(struct port_info *pi, struct ch_sched_queue *p)
207 goto out_err; 207 goto out_err;
208 208
209 /* Bind queue to specified class */ 209 /* Bind queue to specified class */
210 memset(qe, 0, sizeof(*qe));
211 qe->cntxt_id = qid; 210 qe->cntxt_id = qid;
212 memcpy(&qe->param, p, sizeof(qe->param)); 211 memcpy(&qe->param, p, sizeof(qe->param));
213 212
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 82015c8a5ed7..b7a246b33599 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4697,8 +4697,12 @@ int be_update_queues(struct be_adapter *adapter)
4697 struct net_device *netdev = adapter->netdev; 4697 struct net_device *netdev = adapter->netdev;
4698 int status; 4698 int status;
4699 4699
4700 if (netif_running(netdev)) 4700 if (netif_running(netdev)) {
4701 /* device cannot transmit now, avoid dev_watchdog timeouts */
4702 netif_carrier_off(netdev);
4703
4701 be_close(netdev); 4704 be_close(netdev);
4705 }
4702 4706
4703 be_cancel_worker(adapter); 4707 be_cancel_worker(adapter);
4704 4708
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 9d459ccf251d..e5610a4da539 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3144,8 +3144,6 @@ static int fec_enet_init(struct net_device *ndev)
3144 return -ENOMEM; 3144 return -ENOMEM;
3145 } 3145 }
3146 3146
3147 memset(cbd_base, 0, bd_size);
3148
3149 /* Get the Ethernet address */ 3147 /* Get the Ethernet address */
3150 fec_get_mac(ndev); 3148 fec_get_mac(ndev);
3151 /* make sure MAC we just acquired is programmed into the hw */ 3149 /* make sure MAC we just acquired is programmed into the hw */
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 24f16e3368cd..497298752381 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -232,7 +232,7 @@ abort_with_mgmt_vector:
232abort_with_msix_enabled: 232abort_with_msix_enabled:
233 pci_disable_msix(priv->pdev); 233 pci_disable_msix(priv->pdev);
234abort_with_msix_vectors: 234abort_with_msix_vectors:
235 kfree(priv->msix_vectors); 235 kvfree(priv->msix_vectors);
236 priv->msix_vectors = NULL; 236 priv->msix_vectors = NULL;
237 return err; 237 return err;
238} 238}
@@ -256,7 +256,7 @@ static void gve_free_notify_blocks(struct gve_priv *priv)
256 priv->ntfy_blocks = NULL; 256 priv->ntfy_blocks = NULL;
257 free_irq(priv->msix_vectors[priv->mgmt_msix_idx].vector, priv); 257 free_irq(priv->msix_vectors[priv->mgmt_msix_idx].vector, priv);
258 pci_disable_msix(priv->pdev); 258 pci_disable_msix(priv->pdev);
259 kfree(priv->msix_vectors); 259 kvfree(priv->msix_vectors);
260 priv->msix_vectors = NULL; 260 priv->msix_vectors = NULL;
261} 261}
262 262
@@ -445,12 +445,12 @@ static int gve_alloc_rings(struct gve_priv *priv)
445 return 0; 445 return 0;
446 446
447free_rx: 447free_rx:
448 kfree(priv->rx); 448 kvfree(priv->rx);
449 priv->rx = NULL; 449 priv->rx = NULL;
450free_tx_queue: 450free_tx_queue:
451 gve_tx_free_rings(priv); 451 gve_tx_free_rings(priv);
452free_tx: 452free_tx:
453 kfree(priv->tx); 453 kvfree(priv->tx);
454 priv->tx = NULL; 454 priv->tx = NULL;
455 return err; 455 return err;
456} 456}
@@ -500,7 +500,7 @@ static void gve_free_rings(struct gve_priv *priv)
500 gve_remove_napi(priv, ntfy_idx); 500 gve_remove_napi(priv, ntfy_idx);
501 } 501 }
502 gve_tx_free_rings(priv); 502 gve_tx_free_rings(priv);
503 kfree(priv->tx); 503 kvfree(priv->tx);
504 priv->tx = NULL; 504 priv->tx = NULL;
505 } 505 }
506 if (priv->rx) { 506 if (priv->rx) {
@@ -509,7 +509,7 @@ static void gve_free_rings(struct gve_priv *priv)
509 gve_remove_napi(priv, ntfy_idx); 509 gve_remove_napi(priv, ntfy_idx);
510 } 510 }
511 gve_rx_free_rings(priv); 511 gve_rx_free_rings(priv);
512 kfree(priv->rx); 512 kvfree(priv->rx);
513 priv->rx = NULL; 513 priv->rx = NULL;
514 } 514 }
515} 515}
@@ -592,9 +592,9 @@ static void gve_free_queue_page_list(struct gve_priv *priv,
592 gve_free_page(&priv->pdev->dev, qpl->pages[i], 592 gve_free_page(&priv->pdev->dev, qpl->pages[i],
593 qpl->page_buses[i], gve_qpl_dma_dir(priv, id)); 593 qpl->page_buses[i], gve_qpl_dma_dir(priv, id));
594 594
595 kfree(qpl->page_buses); 595 kvfree(qpl->page_buses);
596free_pages: 596free_pages:
597 kfree(qpl->pages); 597 kvfree(qpl->pages);
598 priv->num_registered_pages -= qpl->num_entries; 598 priv->num_registered_pages -= qpl->num_entries;
599} 599}
600 600
@@ -635,7 +635,7 @@ static int gve_alloc_qpls(struct gve_priv *priv)
635free_qpls: 635free_qpls:
636 for (j = 0; j <= i; j++) 636 for (j = 0; j <= i; j++)
637 gve_free_queue_page_list(priv, j); 637 gve_free_queue_page_list(priv, j);
638 kfree(priv->qpls); 638 kvfree(priv->qpls);
639 return err; 639 return err;
640} 640}
641 641
@@ -644,12 +644,12 @@ static void gve_free_qpls(struct gve_priv *priv)
644 int num_qpls = gve_num_tx_qpls(priv) + gve_num_rx_qpls(priv); 644 int num_qpls = gve_num_tx_qpls(priv) + gve_num_rx_qpls(priv);
645 int i; 645 int i;
646 646
647 kfree(priv->qpl_cfg.qpl_id_map); 647 kvfree(priv->qpl_cfg.qpl_id_map);
648 648
649 for (i = 0; i < num_qpls; i++) 649 for (i = 0; i < num_qpls; i++)
650 gve_free_queue_page_list(priv, i); 650 gve_free_queue_page_list(priv, i);
651 651
652 kfree(priv->qpls); 652 kvfree(priv->qpls);
653} 653}
654 654
655/* Use this to schedule a reset when the device is capable of continuing 655/* Use this to schedule a reset when the device is capable of continuing
@@ -1192,7 +1192,6 @@ abort_with_enabled:
1192 pci_disable_device(pdev); 1192 pci_disable_device(pdev);
1193 return -ENXIO; 1193 return -ENXIO;
1194} 1194}
1195EXPORT_SYMBOL(gve_probe);
1196 1195
1197static void gve_remove(struct pci_dev *pdev) 1196static void gve_remove(struct pci_dev *pdev)
1198{ 1197{
diff --git a/drivers/net/ethernet/google/gve/gve_rx.c b/drivers/net/ethernet/google/gve/gve_rx.c
index c1aeabd1c594..1914b8350da7 100644
--- a/drivers/net/ethernet/google/gve/gve_rx.c
+++ b/drivers/net/ethernet/google/gve/gve_rx.c
@@ -35,7 +35,7 @@ static void gve_rx_free_ring(struct gve_priv *priv, int idx)
35 35
36 gve_unassign_qpl(priv, rx->data.qpl->id); 36 gve_unassign_qpl(priv, rx->data.qpl->id);
37 rx->data.qpl = NULL; 37 rx->data.qpl = NULL;
38 kfree(rx->data.page_info); 38 kvfree(rx->data.page_info);
39 39
40 slots = rx->data.mask + 1; 40 slots = rx->data.mask + 1;
41 bytes = sizeof(*rx->data.data_ring) * slots; 41 bytes = sizeof(*rx->data.data_ring) * slots;
@@ -168,7 +168,7 @@ abort_with_q_resources:
168 rx->q_resources, rx->q_resources_bus); 168 rx->q_resources, rx->q_resources_bus);
169 rx->q_resources = NULL; 169 rx->q_resources = NULL;
170abort_filled: 170abort_filled:
171 kfree(rx->data.page_info); 171 kvfree(rx->data.page_info);
172abort_with_slots: 172abort_with_slots:
173 bytes = sizeof(*rx->data.data_ring) * slots; 173 bytes = sizeof(*rx->data.data_ring) * slots;
174 dma_free_coherent(hdev, bytes, rx->data.data_ring, rx->data.data_bus); 174 dma_free_coherent(hdev, bytes, rx->data.data_ring, rx->data.data_bus);
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index 76b7b7b85e35..0b668357db4d 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -582,11 +582,6 @@ jme_setup_tx_resources(struct jme_adapter *jme)
582 if (unlikely(!(txring->bufinf))) 582 if (unlikely(!(txring->bufinf)))
583 goto err_free_txring; 583 goto err_free_txring;
584 584
585 /*
586 * Initialize Transmit Descriptors
587 */
588 memset(txring->alloc, 0, TX_RING_ALLOC_SIZE(jme->tx_ring_size));
589
590 return 0; 585 return 0;
591 586
592err_free_txring: 587err_free_txring:
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 35a92fd2cf39..9ac854c2b371 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -2558,8 +2558,6 @@ static int skge_up(struct net_device *dev)
2558 goto free_pci_mem; 2558 goto free_pci_mem;
2559 } 2559 }
2560 2560
2561 memset(skge->mem, 0, skge->mem_size);
2562
2563 err = skge_ring_alloc(&skge->rx_ring, skge->mem, skge->dma); 2561 err = skge_ring_alloc(&skge->rx_ring, skge->mem, skge->dma);
2564 if (err) 2562 if (err)
2565 goto free_pci_mem; 2563 goto free_pci_mem;
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index fe518c854d1f..f518312ffe69 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -4917,6 +4917,13 @@ static const struct dmi_system_id msi_blacklist[] = {
4917 DMI_MATCH(DMI_PRODUCT_NAME, "P-79"), 4917 DMI_MATCH(DMI_PRODUCT_NAME, "P-79"),
4918 }, 4918 },
4919 }, 4919 },
4920 {
4921 .ident = "ASUS P5W DH Deluxe",
4922 .matches = {
4923 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTEK COMPUTER INC"),
4924 DMI_MATCH(DMI_PRODUCT_NAME, "P5W DH Deluxe"),
4925 },
4926 },
4920 {} 4927 {}
4921}; 4928};
4922 4929
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index b20b3a5a1ebb..c39d7f4ab1d4 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2548,8 +2548,10 @@ static int mtk_probe(struct platform_device *pdev)
2548 continue; 2548 continue;
2549 2549
2550 err = mtk_add_mac(eth, mac_np); 2550 err = mtk_add_mac(eth, mac_np);
2551 if (err) 2551 if (err) {
2552 of_node_put(mac_np);
2552 goto err_deinit_hw; 2553 goto err_deinit_hw;
2554 }
2553 } 2555 }
2554 2556
2555 if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) { 2557 if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index a5be27772b8e..c790a5fcea73 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -1013,8 +1013,6 @@ static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
1013 1013
1014 dma_list[i] = t; 1014 dma_list[i] = t;
1015 eq->page_list[i].map = t; 1015 eq->page_list[i].map = t;
1016
1017 memset(eq->page_list[i].buf, 0, PAGE_SIZE);
1018 } 1016 }
1019 1017
1020 eq->eqn = mlx4_bitmap_alloc(&priv->eq_table.bitmap); 1018 eq->eqn = mlx4_bitmap_alloc(&priv->eq_table.bitmap);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 2d6436257f9d..cc096f6011d9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1499,7 +1499,8 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
1499 *match_level = MLX5_MATCH_NONE; 1499 *match_level = MLX5_MATCH_NONE;
1500 1500
1501 if (dissector->used_keys & 1501 if (dissector->used_keys &
1502 ~(BIT(FLOW_DISSECTOR_KEY_CONTROL) | 1502 ~(BIT(FLOW_DISSECTOR_KEY_META) |
1503 BIT(FLOW_DISSECTOR_KEY_CONTROL) |
1503 BIT(FLOW_DISSECTOR_KEY_BASIC) | 1504 BIT(FLOW_DISSECTOR_KEY_BASIC) |
1504 BIT(FLOW_DISSECTOR_KEY_ETH_ADDRS) | 1505 BIT(FLOW_DISSECTOR_KEY_ETH_ADDRS) |
1505 BIT(FLOW_DISSECTOR_KEY_VLAN) | 1506 BIT(FLOW_DISSECTOR_KEY_VLAN) |
@@ -1522,11 +1523,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
1522 return -EOPNOTSUPP; 1523 return -EOPNOTSUPP;
1523 } 1524 }
1524 1525
1525 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS) || 1526 if (mlx5e_get_tc_tun(filter_dev)) {
1526 flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS) ||
1527 flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_KEYID) ||
1528 flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_PORTS) ||
1529 flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_OPTS)) {
1530 if (parse_tunnel_attr(priv, spec, f, filter_dev, tunnel_match_level)) 1527 if (parse_tunnel_attr(priv, spec, f, filter_dev, tunnel_match_level))
1531 return -EOPNOTSUPP; 1528 return -EOPNOTSUPP;
1532 1529
@@ -2647,6 +2644,10 @@ static int mlx5e_attach_encap(struct mlx5e_priv *priv,
2647 family = ip_tunnel_info_af(tun_info); 2644 family = ip_tunnel_info_af(tun_info);
2648 key.ip_tun_key = &tun_info->key; 2645 key.ip_tun_key = &tun_info->key;
2649 key.tc_tunnel = mlx5e_get_tc_tun(mirred_dev); 2646 key.tc_tunnel = mlx5e_get_tc_tun(mirred_dev);
2647 if (!key.tc_tunnel) {
2648 NL_SET_ERR_MSG_MOD(extack, "Unsupported tunnel");
2649 return -EOPNOTSUPP;
2650 }
2650 2651
2651 hash_key = hash_encap_info(&key); 2652 hash_key = hash_encap_info(&key);
2652 2653
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index 3b04d8927fb1..1f3891fde2eb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -2450,7 +2450,6 @@ int mlx5_eswitch_get_vport_stats(struct mlx5_eswitch *esw,
2450 MLX5_SET(query_vport_counter_in, in, vport_number, vport->vport); 2450 MLX5_SET(query_vport_counter_in, in, vport_number, vport->vport);
2451 MLX5_SET(query_vport_counter_in, in, other_vport, 1); 2451 MLX5_SET(query_vport_counter_in, in, other_vport, 1);
2452 2452
2453 memset(out, 0, outlen);
2454 err = mlx5_cmd_exec(esw->dev, in, sizeof(in), out, outlen); 2453 err = mlx5_cmd_exec(esw->dev, in, sizeof(in), out, outlen);
2455 if (err) 2454 if (err)
2456 goto free_out; 2455 goto free_out;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 957d9b09dc3f..089ae4d48a82 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -1134,7 +1134,6 @@ static int esw_create_offloads_fdb_tables(struct mlx5_eswitch *esw, int nvports)
1134 } 1134 }
1135 1135
1136 /* create send-to-vport group */ 1136 /* create send-to-vport group */
1137 memset(flow_group_in, 0, inlen);
1138 MLX5_SET(create_flow_group_in, flow_group_in, match_criteria_enable, 1137 MLX5_SET(create_flow_group_in, flow_group_in, match_criteria_enable,
1139 MLX5_MATCH_MISC_PARAMETERS); 1138 MLX5_MATCH_MISC_PARAMETERS);
1140 1139
@@ -1293,8 +1292,6 @@ static int esw_create_vport_rx_group(struct mlx5_eswitch *esw, int nvports)
1293 return -ENOMEM; 1292 return -ENOMEM;
1294 1293
1295 /* create vport rx group */ 1294 /* create vport rx group */
1296 memset(flow_group_in, 0, inlen);
1297
1298 esw_set_flow_group_source_port(esw, flow_group_in); 1295 esw_set_flow_group_source_port(esw, flow_group_in);
1299 1296
1300 MLX5_SET(create_flow_group_in, flow_group_in, start_flow_index, 0); 1297 MLX5_SET(create_flow_group_in, flow_group_in, start_flow_index, 0);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 2fe6923f7ce0..9314777d99e3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -597,7 +597,7 @@ mlx5_fw_fatal_reporter_dump(struct devlink_health_reporter *reporter,
597 err = devlink_fmsg_arr_pair_nest_end(fmsg); 597 err = devlink_fmsg_arr_pair_nest_end(fmsg);
598 598
599free_data: 599free_data:
600 kfree(cr_data); 600 kvfree(cr_data);
601 return err; 601 return err;
602} 602}
603 603
diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c
index 051b19388a81..615455a21567 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c
@@ -847,7 +847,6 @@ static int mlxsw_pci_queue_init(struct mlxsw_pci *mlxsw_pci, char *mbox,
847 &mem_item->mapaddr); 847 &mem_item->mapaddr);
848 if (!mem_item->buf) 848 if (!mem_item->buf)
849 return -ENOMEM; 849 return -ENOMEM;
850 memset(mem_item->buf, 0, mem_item->size);
851 850
852 q->elem_info = kcalloc(q->count, sizeof(*q->elem_info), GFP_KERNEL); 851 q->elem_info = kcalloc(q->count, sizeof(*q->elem_info), GFP_KERNEL);
853 if (!q->elem_info) { 852 if (!q->elem_info) {
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index a252b080dda9..131f62ce9297 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -830,6 +830,7 @@ int mlxsw_sp_setup_tc_prio(struct mlxsw_sp_port *mlxsw_sp_port,
830 struct tc_prio_qopt_offload *p); 830 struct tc_prio_qopt_offload *p);
831 831
832/* spectrum_fid.c */ 832/* spectrum_fid.c */
833bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index);
833bool mlxsw_sp_fid_lag_vid_valid(const struct mlxsw_sp_fid *fid); 834bool mlxsw_sp_fid_lag_vid_valid(const struct mlxsw_sp_fid *fid);
834struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp, 835struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp,
835 u16 fid_index); 836 u16 fid_index);
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
index b25048c6c761..21296fa7f7fb 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
@@ -408,14 +408,6 @@ static int mlxsw_sp_port_dcb_app_update(struct mlxsw_sp_port *mlxsw_sp_port)
408 have_dscp = mlxsw_sp_port_dcb_app_prio_dscp_map(mlxsw_sp_port, 408 have_dscp = mlxsw_sp_port_dcb_app_prio_dscp_map(mlxsw_sp_port,
409 &prio_map); 409 &prio_map);
410 410
411 if (!have_dscp) {
412 err = mlxsw_sp_port_dcb_toggle_trust(mlxsw_sp_port,
413 MLXSW_REG_QPTS_TRUST_STATE_PCP);
414 if (err)
415 netdev_err(mlxsw_sp_port->dev, "Couldn't switch to trust L2\n");
416 return err;
417 }
418
419 mlxsw_sp_port_dcb_app_dscp_prio_map(mlxsw_sp_port, default_prio, 411 mlxsw_sp_port_dcb_app_dscp_prio_map(mlxsw_sp_port, default_prio,
420 &dscp_map); 412 &dscp_map);
421 err = mlxsw_sp_port_dcb_app_update_qpdpm(mlxsw_sp_port, 413 err = mlxsw_sp_port_dcb_app_update_qpdpm(mlxsw_sp_port,
@@ -432,6 +424,14 @@ static int mlxsw_sp_port_dcb_app_update(struct mlxsw_sp_port *mlxsw_sp_port)
432 return err; 424 return err;
433 } 425 }
434 426
427 if (!have_dscp) {
428 err = mlxsw_sp_port_dcb_toggle_trust(mlxsw_sp_port,
429 MLXSW_REG_QPTS_TRUST_STATE_PCP);
430 if (err)
431 netdev_err(mlxsw_sp_port->dev, "Couldn't switch to trust L2\n");
432 return err;
433 }
434
435 err = mlxsw_sp_port_dcb_toggle_trust(mlxsw_sp_port, 435 err = mlxsw_sp_port_dcb_toggle_trust(mlxsw_sp_port,
436 MLXSW_REG_QPTS_TRUST_STATE_DSCP); 436 MLXSW_REG_QPTS_TRUST_STATE_DSCP);
437 if (err) { 437 if (err) {
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c
index 46baf3b44309..8df3cb21baa6 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c
@@ -126,6 +126,16 @@ static const int *mlxsw_sp_packet_type_sfgc_types[] = {
126 [MLXSW_SP_FLOOD_TYPE_MC] = mlxsw_sp_sfgc_mc_packet_types, 126 [MLXSW_SP_FLOOD_TYPE_MC] = mlxsw_sp_sfgc_mc_packet_types,
127}; 127};
128 128
129bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index)
130{
131 enum mlxsw_sp_fid_type fid_type = MLXSW_SP_FID_TYPE_DUMMY;
132 struct mlxsw_sp_fid_family *fid_family;
133
134 fid_family = mlxsw_sp->fid_core->fid_family_arr[fid_type];
135
136 return fid_family->start_index == fid_index;
137}
138
129bool mlxsw_sp_fid_lag_vid_valid(const struct mlxsw_sp_fid *fid) 139bool mlxsw_sp_fid_lag_vid_valid(const struct mlxsw_sp_fid *fid)
130{ 140{
131 return fid->fid_family->lag_vid_valid; 141 return fid->fid_family->lag_vid_valid;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 50111f228d77..5ecb45118400 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -2468,6 +2468,9 @@ static void mlxsw_sp_fdb_notify_mac_process(struct mlxsw_sp *mlxsw_sp,
2468 goto just_remove; 2468 goto just_remove;
2469 } 2469 }
2470 2470
2471 if (mlxsw_sp_fid_is_dummy(mlxsw_sp, fid))
2472 goto just_remove;
2473
2471 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid); 2474 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid);
2472 if (!mlxsw_sp_port_vlan) { 2475 if (!mlxsw_sp_port_vlan) {
2473 netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n"); 2476 netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n");
@@ -2527,6 +2530,9 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
2527 goto just_remove; 2530 goto just_remove;
2528 } 2531 }
2529 2532
2533 if (mlxsw_sp_fid_is_dummy(mlxsw_sp, fid))
2534 goto just_remove;
2535
2530 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid); 2536 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid);
2531 if (!mlxsw_sp_port_vlan) { 2537 if (!mlxsw_sp_port_vlan) {
2532 netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n"); 2538 netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n");
diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c
index 58bde1a9eacb..2451d4a96490 100644
--- a/drivers/net/ethernet/mscc/ocelot_board.c
+++ b/drivers/net/ethernet/mscc/ocelot_board.c
@@ -291,8 +291,10 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
291 continue; 291 continue;
292 292
293 err = ocelot_probe_port(ocelot, port, regs, phy); 293 err = ocelot_probe_port(ocelot, port, regs, phy);
294 if (err) 294 if (err) {
295 of_node_put(portnp);
295 return err; 296 return err;
297 }
296 298
297 phy_mode = of_get_phy_mode(portnp); 299 phy_mode = of_get_phy_mode(portnp);
298 if (phy_mode < 0) 300 if (phy_mode < 0)
@@ -318,6 +320,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
318 dev_err(ocelot->dev, 320 dev_err(ocelot->dev,
319 "invalid phy mode for port%d, (Q)SGMII only\n", 321 "invalid phy mode for port%d, (Q)SGMII only\n",
320 port); 322 port);
323 of_node_put(portnp);
321 return -EINVAL; 324 return -EINVAL;
322 } 325 }
323 326
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index 3b2ae1a21678..e0b2bf327905 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -747,7 +747,6 @@ static int init_shared_mem(struct s2io_nic *nic)
747 return -ENOMEM; 747 return -ENOMEM;
748 } 748 }
749 mem_allocated += size; 749 mem_allocated += size;
750 memset(tmp_v_addr, 0, size);
751 750
752 size = sizeof(struct rxd_info) * 751 size = sizeof(struct rxd_info) *
753 rxd_count[nic->rxd_mode]; 752 rxd_count[nic->rxd_mode];
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
index 433052f734ed..5e9f8ee99800 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
@@ -442,10 +442,8 @@ nx_fw_cmd_create_tx_ctx(struct netxen_adapter *adapter)
442 goto out_free_rq; 442 goto out_free_rq;
443 } 443 }
444 444
445 memset(rq_addr, 0, rq_size);
446 prq = rq_addr; 445 prq = rq_addr;
447 446
448 memset(rsp_addr, 0, rsp_size);
449 prsp = rsp_addr; 447 prsp = rsp_addr;
450 448
451 prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr); 449 prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr);
@@ -755,7 +753,6 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
755 return -ENOMEM; 753 return -ENOMEM;
756 } 754 }
757 755
758 memset(addr, 0, sizeof(struct netxen_ring_ctx));
759 recv_ctx->hwctx = addr; 756 recv_ctx->hwctx = addr;
760 recv_ctx->hwctx->ctx_id = cpu_to_le32(port); 757 recv_ctx->hwctx->ctx_id = cpu_to_le32(port);
761 recv_ctx->hwctx->cmd_consumer_offset = 758 recv_ctx->hwctx->cmd_consumer_offset =
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index efef5453b94f..0637c6752a78 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4667,6 +4667,143 @@ static void rtl_hw_start_8411_2(struct rtl8169_private *tp)
4667 /* disable aspm and clock request before access ephy */ 4667 /* disable aspm and clock request before access ephy */
4668 rtl_hw_aspm_clkreq_enable(tp, false); 4668 rtl_hw_aspm_clkreq_enable(tp, false);
4669 rtl_ephy_init(tp, e_info_8411_2); 4669 rtl_ephy_init(tp, e_info_8411_2);
4670
4671 /* The following Realtek-provided magic fixes an issue with the RX unit
4672 * getting confused after the PHY having been powered-down.
4673 */
4674 r8168_mac_ocp_write(tp, 0xFC28, 0x0000);
4675 r8168_mac_ocp_write(tp, 0xFC2A, 0x0000);
4676 r8168_mac_ocp_write(tp, 0xFC2C, 0x0000);
4677 r8168_mac_ocp_write(tp, 0xFC2E, 0x0000);
4678 r8168_mac_ocp_write(tp, 0xFC30, 0x0000);
4679 r8168_mac_ocp_write(tp, 0xFC32, 0x0000);
4680 r8168_mac_ocp_write(tp, 0xFC34, 0x0000);
4681 r8168_mac_ocp_write(tp, 0xFC36, 0x0000);
4682 mdelay(3);
4683 r8168_mac_ocp_write(tp, 0xFC26, 0x0000);
4684
4685 r8168_mac_ocp_write(tp, 0xF800, 0xE008);
4686 r8168_mac_ocp_write(tp, 0xF802, 0xE00A);
4687 r8168_mac_ocp_write(tp, 0xF804, 0xE00C);
4688 r8168_mac_ocp_write(tp, 0xF806, 0xE00E);
4689 r8168_mac_ocp_write(tp, 0xF808, 0xE027);
4690 r8168_mac_ocp_write(tp, 0xF80A, 0xE04F);
4691 r8168_mac_ocp_write(tp, 0xF80C, 0xE05E);
4692 r8168_mac_ocp_write(tp, 0xF80E, 0xE065);
4693 r8168_mac_ocp_write(tp, 0xF810, 0xC602);
4694 r8168_mac_ocp_write(tp, 0xF812, 0xBE00);
4695 r8168_mac_ocp_write(tp, 0xF814, 0x0000);
4696 r8168_mac_ocp_write(tp, 0xF816, 0xC502);
4697 r8168_mac_ocp_write(tp, 0xF818, 0xBD00);
4698 r8168_mac_ocp_write(tp, 0xF81A, 0x074C);
4699 r8168_mac_ocp_write(tp, 0xF81C, 0xC302);
4700 r8168_mac_ocp_write(tp, 0xF81E, 0xBB00);
4701 r8168_mac_ocp_write(tp, 0xF820, 0x080A);
4702 r8168_mac_ocp_write(tp, 0xF822, 0x6420);
4703 r8168_mac_ocp_write(tp, 0xF824, 0x48C2);
4704 r8168_mac_ocp_write(tp, 0xF826, 0x8C20);
4705 r8168_mac_ocp_write(tp, 0xF828, 0xC516);
4706 r8168_mac_ocp_write(tp, 0xF82A, 0x64A4);
4707 r8168_mac_ocp_write(tp, 0xF82C, 0x49C0);
4708 r8168_mac_ocp_write(tp, 0xF82E, 0xF009);
4709 r8168_mac_ocp_write(tp, 0xF830, 0x74A2);
4710 r8168_mac_ocp_write(tp, 0xF832, 0x8CA5);
4711 r8168_mac_ocp_write(tp, 0xF834, 0x74A0);
4712 r8168_mac_ocp_write(tp, 0xF836, 0xC50E);
4713 r8168_mac_ocp_write(tp, 0xF838, 0x9CA2);
4714 r8168_mac_ocp_write(tp, 0xF83A, 0x1C11);
4715 r8168_mac_ocp_write(tp, 0xF83C, 0x9CA0);
4716 r8168_mac_ocp_write(tp, 0xF83E, 0xE006);
4717 r8168_mac_ocp_write(tp, 0xF840, 0x74F8);
4718 r8168_mac_ocp_write(tp, 0xF842, 0x48C4);
4719 r8168_mac_ocp_write(tp, 0xF844, 0x8CF8);
4720 r8168_mac_ocp_write(tp, 0xF846, 0xC404);
4721 r8168_mac_ocp_write(tp, 0xF848, 0xBC00);
4722 r8168_mac_ocp_write(tp, 0xF84A, 0xC403);
4723 r8168_mac_ocp_write(tp, 0xF84C, 0xBC00);
4724 r8168_mac_ocp_write(tp, 0xF84E, 0x0BF2);
4725 r8168_mac_ocp_write(tp, 0xF850, 0x0C0A);
4726 r8168_mac_ocp_write(tp, 0xF852, 0xE434);
4727 r8168_mac_ocp_write(tp, 0xF854, 0xD3C0);
4728 r8168_mac_ocp_write(tp, 0xF856, 0x49D9);
4729 r8168_mac_ocp_write(tp, 0xF858, 0xF01F);
4730 r8168_mac_ocp_write(tp, 0xF85A, 0xC526);
4731 r8168_mac_ocp_write(tp, 0xF85C, 0x64A5);
4732 r8168_mac_ocp_write(tp, 0xF85E, 0x1400);
4733 r8168_mac_ocp_write(tp, 0xF860, 0xF007);
4734 r8168_mac_ocp_write(tp, 0xF862, 0x0C01);
4735 r8168_mac_ocp_write(tp, 0xF864, 0x8CA5);
4736 r8168_mac_ocp_write(tp, 0xF866, 0x1C15);
4737 r8168_mac_ocp_write(tp, 0xF868, 0xC51B);
4738 r8168_mac_ocp_write(tp, 0xF86A, 0x9CA0);
4739 r8168_mac_ocp_write(tp, 0xF86C, 0xE013);
4740 r8168_mac_ocp_write(tp, 0xF86E, 0xC519);
4741 r8168_mac_ocp_write(tp, 0xF870, 0x74A0);
4742 r8168_mac_ocp_write(tp, 0xF872, 0x48C4);
4743 r8168_mac_ocp_write(tp, 0xF874, 0x8CA0);
4744 r8168_mac_ocp_write(tp, 0xF876, 0xC516);
4745 r8168_mac_ocp_write(tp, 0xF878, 0x74A4);
4746 r8168_mac_ocp_write(tp, 0xF87A, 0x48C8);
4747 r8168_mac_ocp_write(tp, 0xF87C, 0x48CA);
4748 r8168_mac_ocp_write(tp, 0xF87E, 0x9CA4);
4749 r8168_mac_ocp_write(tp, 0xF880, 0xC512);
4750 r8168_mac_ocp_write(tp, 0xF882, 0x1B00);
4751 r8168_mac_ocp_write(tp, 0xF884, 0x9BA0);
4752 r8168_mac_ocp_write(tp, 0xF886, 0x1B1C);
4753 r8168_mac_ocp_write(tp, 0xF888, 0x483F);
4754 r8168_mac_ocp_write(tp, 0xF88A, 0x9BA2);
4755 r8168_mac_ocp_write(tp, 0xF88C, 0x1B04);
4756 r8168_mac_ocp_write(tp, 0xF88E, 0xC508);
4757 r8168_mac_ocp_write(tp, 0xF890, 0x9BA0);
4758 r8168_mac_ocp_write(tp, 0xF892, 0xC505);
4759 r8168_mac_ocp_write(tp, 0xF894, 0xBD00);
4760 r8168_mac_ocp_write(tp, 0xF896, 0xC502);
4761 r8168_mac_ocp_write(tp, 0xF898, 0xBD00);
4762 r8168_mac_ocp_write(tp, 0xF89A, 0x0300);
4763 r8168_mac_ocp_write(tp, 0xF89C, 0x051E);
4764 r8168_mac_ocp_write(tp, 0xF89E, 0xE434);
4765 r8168_mac_ocp_write(tp, 0xF8A0, 0xE018);
4766 r8168_mac_ocp_write(tp, 0xF8A2, 0xE092);
4767 r8168_mac_ocp_write(tp, 0xF8A4, 0xDE20);
4768 r8168_mac_ocp_write(tp, 0xF8A6, 0xD3C0);
4769 r8168_mac_ocp_write(tp, 0xF8A8, 0xC50F);
4770 r8168_mac_ocp_write(tp, 0xF8AA, 0x76A4);
4771 r8168_mac_ocp_write(tp, 0xF8AC, 0x49E3);
4772 r8168_mac_ocp_write(tp, 0xF8AE, 0xF007);
4773 r8168_mac_ocp_write(tp, 0xF8B0, 0x49C0);
4774 r8168_mac_ocp_write(tp, 0xF8B2, 0xF103);
4775 r8168_mac_ocp_write(tp, 0xF8B4, 0xC607);
4776 r8168_mac_ocp_write(tp, 0xF8B6, 0xBE00);
4777 r8168_mac_ocp_write(tp, 0xF8B8, 0xC606);
4778 r8168_mac_ocp_write(tp, 0xF8BA, 0xBE00);
4779 r8168_mac_ocp_write(tp, 0xF8BC, 0xC602);
4780 r8168_mac_ocp_write(tp, 0xF8BE, 0xBE00);
4781 r8168_mac_ocp_write(tp, 0xF8C0, 0x0C4C);
4782 r8168_mac_ocp_write(tp, 0xF8C2, 0x0C28);
4783 r8168_mac_ocp_write(tp, 0xF8C4, 0x0C2C);
4784 r8168_mac_ocp_write(tp, 0xF8C6, 0xDC00);
4785 r8168_mac_ocp_write(tp, 0xF8C8, 0xC707);
4786 r8168_mac_ocp_write(tp, 0xF8CA, 0x1D00);
4787 r8168_mac_ocp_write(tp, 0xF8CC, 0x8DE2);
4788 r8168_mac_ocp_write(tp, 0xF8CE, 0x48C1);
4789 r8168_mac_ocp_write(tp, 0xF8D0, 0xC502);
4790 r8168_mac_ocp_write(tp, 0xF8D2, 0xBD00);
4791 r8168_mac_ocp_write(tp, 0xF8D4, 0x00AA);
4792 r8168_mac_ocp_write(tp, 0xF8D6, 0xE0C0);
4793 r8168_mac_ocp_write(tp, 0xF8D8, 0xC502);
4794 r8168_mac_ocp_write(tp, 0xF8DA, 0xBD00);
4795 r8168_mac_ocp_write(tp, 0xF8DC, 0x0132);
4796
4797 r8168_mac_ocp_write(tp, 0xFC26, 0x8000);
4798
4799 r8168_mac_ocp_write(tp, 0xFC2A, 0x0743);
4800 r8168_mac_ocp_write(tp, 0xFC2C, 0x0801);
4801 r8168_mac_ocp_write(tp, 0xFC2E, 0x0BE9);
4802 r8168_mac_ocp_write(tp, 0xFC30, 0x02FD);
4803 r8168_mac_ocp_write(tp, 0xFC32, 0x0C25);
4804 r8168_mac_ocp_write(tp, 0xFC34, 0x00A9);
4805 r8168_mac_ocp_write(tp, 0xFC36, 0x012D);
4806
4670 rtl_hw_aspm_clkreq_enable(tp, true); 4807 rtl_hw_aspm_clkreq_enable(tp, true);
4671} 4808}
4672 4809
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
index aba6eea72f15..6e07f5ebacfc 100644
--- a/drivers/net/ethernet/sis/sis900.c
+++ b/drivers/net/ethernet/sis/sis900.c
@@ -262,7 +262,7 @@ static int sis900_get_mac_addr(struct pci_dev *pci_dev,
262 /* check to see if we have sane EEPROM */ 262 /* check to see if we have sane EEPROM */
263 signature = (u16) read_eeprom(ioaddr, EEPROMSignature); 263 signature = (u16) read_eeprom(ioaddr, EEPROMSignature);
264 if (signature == 0xffff || signature == 0x0000) { 264 if (signature == 0xffff || signature == 0x0000) {
265 printk (KERN_WARNING "%s: Error EERPOM read %x\n", 265 printk (KERN_WARNING "%s: Error EEPROM read %x\n",
266 pci_name(pci_dev), signature); 266 pci_name(pci_dev), signature);
267 return 0; 267 return 0;
268 } 268 }
@@ -359,9 +359,9 @@ static int sis635_get_mac_addr(struct pci_dev *pci_dev,
359 * 359 *
360 * SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM 360 * SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM
361 * is shared by 361 * is shared by
362 * LAN and 1394. When access EEPROM, send EEREQ signal to hardware first 362 * LAN and 1394. When accessing EEPROM, send EEREQ signal to hardware first
363 * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be accessed 363 * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be accessed
364 * by LAN, otherwise is not. After MAC address is read from EEPROM, send 364 * by LAN, otherwise it is not. After MAC address is read from EEPROM, send
365 * EEDONE signal to refuse EEPROM access by LAN. 365 * EEDONE signal to refuse EEPROM access by LAN.
366 * The EEPROM map of SiS962 or SiS963 is different to SiS900. 366 * The EEPROM map of SiS962 or SiS963 is different to SiS900.
367 * The signature field in SiS962 or SiS963 spec is meaningless. 367 * The signature field in SiS962 or SiS963 spec is meaningless.
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index f320f9a0de8b..32a89744972d 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2570,7 +2570,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
2570 ret = PTR_ERR(slave_data->ifphy); 2570 ret = PTR_ERR(slave_data->ifphy);
2571 dev_err(&pdev->dev, 2571 dev_err(&pdev->dev,
2572 "%d: Error retrieving port phy: %d\n", i, ret); 2572 "%d: Error retrieving port phy: %d\n", i, ret);
2573 return ret; 2573 goto err_node_put;
2574 } 2574 }
2575 2575
2576 slave_data->slave_node = slave_node; 2576 slave_data->slave_node = slave_node;
@@ -2589,7 +2589,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
2589 if (ret) { 2589 if (ret) {
2590 if (ret != -EPROBE_DEFER) 2590 if (ret != -EPROBE_DEFER)
2591 dev_err(&pdev->dev, "failed to register fixed-link phy: %d\n", ret); 2591 dev_err(&pdev->dev, "failed to register fixed-link phy: %d\n", ret);
2592 return ret; 2592 goto err_node_put;
2593 } 2593 }
2594 slave_data->phy_node = of_node_get(slave_node); 2594 slave_data->phy_node = of_node_get(slave_node);
2595 } else if (parp) { 2595 } else if (parp) {
@@ -2607,7 +2607,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
2607 of_node_put(mdio_node); 2607 of_node_put(mdio_node);
2608 if (!mdio) { 2608 if (!mdio) {
2609 dev_err(&pdev->dev, "Missing mdio platform device\n"); 2609 dev_err(&pdev->dev, "Missing mdio platform device\n");
2610 return -EINVAL; 2610 ret = -EINVAL;
2611 goto err_node_put;
2611 } 2612 }
2612 snprintf(slave_data->phy_id, sizeof(slave_data->phy_id), 2613 snprintf(slave_data->phy_id, sizeof(slave_data->phy_id),
2613 PHY_ID_FMT, mdio->name, phyid); 2614 PHY_ID_FMT, mdio->name, phyid);
@@ -2622,7 +2623,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
2622 if (slave_data->phy_if < 0) { 2623 if (slave_data->phy_if < 0) {
2623 dev_err(&pdev->dev, "Missing or malformed slave[%d] phy-mode property\n", 2624 dev_err(&pdev->dev, "Missing or malformed slave[%d] phy-mode property\n",
2624 i); 2625 i);
2625 return slave_data->phy_if; 2626 ret = slave_data->phy_if;
2627 goto err_node_put;
2626 } 2628 }
2627 2629
2628no_phy_slave: 2630no_phy_slave:
@@ -2633,7 +2635,7 @@ no_phy_slave:
2633 ret = ti_cm_get_macid(&pdev->dev, i, 2635 ret = ti_cm_get_macid(&pdev->dev, i,
2634 slave_data->mac_addr); 2636 slave_data->mac_addr);
2635 if (ret) 2637 if (ret)
2636 return ret; 2638 goto err_node_put;
2637 } 2639 }
2638 if (data->dual_emac) { 2640 if (data->dual_emac) {
2639 if (of_property_read_u32(slave_node, "dual_emac_res_vlan", 2641 if (of_property_read_u32(slave_node, "dual_emac_res_vlan",
@@ -2648,11 +2650,17 @@ no_phy_slave:
2648 } 2650 }
2649 2651
2650 i++; 2652 i++;
2651 if (i == data->slaves) 2653 if (i == data->slaves) {
2652 break; 2654 ret = 0;
2655 goto err_node_put;
2656 }
2653 } 2657 }
2654 2658
2655 return 0; 2659 return 0;
2660
2661err_node_put:
2662 of_node_put(slave_node);
2663 return ret;
2656} 2664}
2657 2665
2658static void cpsw_remove_dt(struct platform_device *pdev) 2666static void cpsw_remove_dt(struct platform_device *pdev)
@@ -2675,8 +2683,10 @@ static void cpsw_remove_dt(struct platform_device *pdev)
2675 of_node_put(slave_data->phy_node); 2683 of_node_put(slave_data->phy_node);
2676 2684
2677 i++; 2685 i++;
2678 if (i == data->slaves) 2686 if (i == data->slaves) {
2687 of_node_put(slave_node);
2679 break; 2688 break;
2689 }
2680 } 2690 }
2681 2691
2682 of_platform_depopulate(&pdev->dev); 2692 of_platform_depopulate(&pdev->dev);
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index b4ab1a5f6cd0..78f0f2d59e22 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -855,7 +855,6 @@ static int tlan_init(struct net_device *dev)
855 dev->name); 855 dev->name);
856 return -ENOMEM; 856 return -ENOMEM;
857 } 857 }
858 memset(priv->dma_storage, 0, dma_size);
859 priv->rx_list = (struct tlan_list *) 858 priv->rx_list = (struct tlan_list *)
860 ALIGN((unsigned long)priv->dma_storage, 8); 859 ALIGN((unsigned long)priv->dma_storage, 8);
861 priv->rx_list_dma = ALIGN(priv->dma_storage_dma, 8); 860 priv->rx_list_dma = ALIGN(priv->dma_storage_dma, 8);
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 7b9350dbebdd..2a6ec5394966 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -1196,7 +1196,6 @@ static int rr_open(struct net_device *dev)
1196 goto error; 1196 goto error;
1197 } 1197 }
1198 rrpriv->rx_ctrl_dma = dma_addr; 1198 rrpriv->rx_ctrl_dma = dma_addr;
1199 memset(rrpriv->rx_ctrl, 0, 256*sizeof(struct ring_ctrl));
1200 1199
1201 rrpriv->info = pci_alloc_consistent(pdev, sizeof(struct rr_info), 1200 rrpriv->info = pci_alloc_consistent(pdev, sizeof(struct rr_info),
1202 &dma_addr); 1201 &dma_addr);
@@ -1205,7 +1204,6 @@ static int rr_open(struct net_device *dev)
1205 goto error; 1204 goto error;
1206 } 1205 }
1207 rrpriv->info_dma = dma_addr; 1206 rrpriv->info_dma = dma_addr;
1208 memset(rrpriv->info, 0, sizeof(struct rr_info));
1209 wmb(); 1207 wmb();
1210 1208
1211 spin_lock_irqsave(&rrpriv->lock, flags); 1209 spin_lock_irqsave(&rrpriv->lock, flags);
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 8b4ad10cf940..69e0a2acfcb0 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1292,6 +1292,7 @@ static const struct usb_device_id products[] = {
1292 {QMI_FIXED_INTF(0x2001, 0x7e16, 3)}, /* D-Link DWM-221 */ 1292 {QMI_FIXED_INTF(0x2001, 0x7e16, 3)}, /* D-Link DWM-221 */
1293 {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ 1293 {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */
1294 {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ 1294 {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */
1295 {QMI_FIXED_INTF(0x2001, 0x7e3d, 4)}, /* D-Link DWM-222 A2 */
1295 {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */ 1296 {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */
1296 {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */ 1297 {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */
1297 {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ 1298 {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 3f48f05dd2a6..2a1918f25e47 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -3430,7 +3430,6 @@ vmxnet3_probe_device(struct pci_dev *pdev,
3430 err = -ENOMEM; 3430 err = -ENOMEM;
3431 goto err_ver; 3431 goto err_ver;
3432 } 3432 }
3433 memset(adapter->coal_conf, 0, sizeof(*adapter->coal_conf));
3434 adapter->coal_conf->coalMode = VMXNET3_COALESCE_DISABLED; 3433 adapter->coal_conf->coalMode = VMXNET3_COALESCE_DISABLED;
3435 adapter->default_coal_mode = true; 3434 adapter->default_coal_mode = true;
3436 } 3435 }
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index e43a566eef77..0606416dc971 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -7541,6 +7541,8 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
7541 &vht_nss, 7541 &vht_nss,
7542 true); 7542 true);
7543 update_bitrate_mask = false; 7543 update_bitrate_mask = false;
7544 } else {
7545 vht_pfr = 0;
7544 } 7546 }
7545 7547
7546 mutex_lock(&ar->conf_mutex); 7548 mutex_lock(&ar->conf_mutex);
diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
index 93526dfaf791..1f500cddb3a7 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
@@ -80,7 +80,9 @@
80#define IWL_22000_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-" 80#define IWL_22000_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
81#define IWL_22000_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-" 81#define IWL_22000_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-"
82#define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-" 82#define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-"
83#define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0-"
83#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-" 84#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-"
85#define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0-"
84#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-" 86#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-"
85#define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-" 87#define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-"
86#define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-" 88#define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-"
@@ -109,6 +111,8 @@
109 IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode" 111 IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode"
110#define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \ 112#define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \
111 IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode" 113 IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode"
114#define IWL_QU_C_HR_B_MODULE_FIRMWARE(api) \
115 IWL_QU_C_HR_B_FW_PRE __stringify(api) ".ucode"
112#define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \ 116#define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
113 IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode" 117 IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode"
114#define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \ 118#define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \
@@ -256,6 +260,30 @@ const struct iwl_cfg iwl_ax201_cfg_qu_hr = {
256 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT, 260 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
257}; 261};
258 262
263const struct iwl_cfg iwl_ax101_cfg_qu_c0_hr_b0 = {
264 .name = "Intel(R) Wi-Fi 6 AX101",
265 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
266 IWL_DEVICE_22500,
267 /*
268 * This device doesn't support receiving BlockAck with a large bitmap
269 * so we need to restrict the size of transmitted aggregation to the
270 * HT size; mac80211 would otherwise pick the HE max (256) by default.
271 */
272 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
273};
274
275const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0 = {
276 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
277 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
278 IWL_DEVICE_22500,
279 /*
280 * This device doesn't support receiving BlockAck with a large bitmap
281 * so we need to restrict the size of transmitted aggregation to the
282 * HT size; mac80211 would otherwise pick the HE max (256) by default.
283 */
284 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
285};
286
259const struct iwl_cfg iwl_ax101_cfg_quz_hr = { 287const struct iwl_cfg iwl_ax101_cfg_quz_hr = {
260 .name = "Intel(R) Wi-Fi 6 AX101", 288 .name = "Intel(R) Wi-Fi 6 AX101",
261 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE, 289 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
@@ -372,6 +400,30 @@ const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0 = {
372 IWL_DEVICE_22500, 400 IWL_DEVICE_22500,
373}; 401};
374 402
403const struct iwl_cfg iwl9461_2ac_cfg_qu_c0_jf_b0 = {
404 .name = "Intel(R) Wireless-AC 9461",
405 .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
406 IWL_DEVICE_22500,
407};
408
409const struct iwl_cfg iwl9462_2ac_cfg_qu_c0_jf_b0 = {
410 .name = "Intel(R) Wireless-AC 9462",
411 .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
412 IWL_DEVICE_22500,
413};
414
415const struct iwl_cfg iwl9560_2ac_cfg_qu_c0_jf_b0 = {
416 .name = "Intel(R) Wireless-AC 9560",
417 .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
418 IWL_DEVICE_22500,
419};
420
421const struct iwl_cfg iwl9560_2ac_160_cfg_qu_c0_jf_b0 = {
422 .name = "Intel(R) Wireless-AC 9560 160MHz",
423 .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
424 IWL_DEVICE_22500,
425};
426
375const struct iwl_cfg iwl9560_2ac_cfg_qnj_jf_b0 = { 427const struct iwl_cfg iwl9560_2ac_cfg_qnj_jf_b0 = {
376 .name = "Intel(R) Wireless-AC 9560 160MHz", 428 .name = "Intel(R) Wireless-AC 9560 160MHz",
377 .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE, 429 .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE,
@@ -590,6 +642,7 @@ MODULE_FIRMWARE(IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
590MODULE_FIRMWARE(IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); 642MODULE_FIRMWARE(IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
591MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); 643MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
592MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); 644MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
645MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
593MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); 646MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
594MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); 647MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
595MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); 648MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index bc267bd2c3b0..1c1bf1b281cd 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -565,10 +565,13 @@ extern const struct iwl_cfg iwl22000_2ac_cfg_hr;
565extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb; 565extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb;
566extern const struct iwl_cfg iwl22000_2ac_cfg_jf; 566extern const struct iwl_cfg iwl22000_2ac_cfg_jf;
567extern const struct iwl_cfg iwl_ax101_cfg_qu_hr; 567extern const struct iwl_cfg iwl_ax101_cfg_qu_hr;
568extern const struct iwl_cfg iwl_ax101_cfg_qu_c0_hr_b0;
568extern const struct iwl_cfg iwl_ax101_cfg_quz_hr; 569extern const struct iwl_cfg iwl_ax101_cfg_quz_hr;
569extern const struct iwl_cfg iwl22000_2ax_cfg_hr; 570extern const struct iwl_cfg iwl22000_2ax_cfg_hr;
570extern const struct iwl_cfg iwl_ax200_cfg_cc; 571extern const struct iwl_cfg iwl_ax200_cfg_cc;
571extern const struct iwl_cfg iwl_ax201_cfg_qu_hr; 572extern const struct iwl_cfg iwl_ax201_cfg_qu_hr;
573extern const struct iwl_cfg iwl_ax201_cfg_qu_hr;
574extern const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0;
572extern const struct iwl_cfg iwl_ax201_cfg_quz_hr; 575extern const struct iwl_cfg iwl_ax201_cfg_quz_hr;
573extern const struct iwl_cfg iwl_ax1650i_cfg_quz_hr; 576extern const struct iwl_cfg iwl_ax1650i_cfg_quz_hr;
574extern const struct iwl_cfg iwl_ax1650s_cfg_quz_hr; 577extern const struct iwl_cfg iwl_ax1650s_cfg_quz_hr;
@@ -580,6 +583,10 @@ extern const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0;
580extern const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0; 583extern const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0;
581extern const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0; 584extern const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0;
582extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0; 585extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0;
586extern const struct iwl_cfg iwl9461_2ac_cfg_qu_c0_jf_b0;
587extern const struct iwl_cfg iwl9462_2ac_cfg_qu_c0_jf_b0;
588extern const struct iwl_cfg iwl9560_2ac_cfg_qu_c0_jf_b0;
589extern const struct iwl_cfg iwl9560_2ac_160_cfg_qu_c0_jf_b0;
583extern const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0; 590extern const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0;
584extern const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0; 591extern const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0;
585extern const struct iwl_cfg iwl22000_2ax_cfg_jf; 592extern const struct iwl_cfg iwl22000_2ax_cfg_jf;
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-csr.h b/drivers/net/wireless/intel/iwlwifi/iwl-csr.h
index 93da96a7247c..cb4c5514a556 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-csr.h
@@ -328,6 +328,8 @@ enum {
328#define CSR_HW_REV_TYPE_NONE (0x00001F0) 328#define CSR_HW_REV_TYPE_NONE (0x00001F0)
329#define CSR_HW_REV_TYPE_QNJ (0x0000360) 329#define CSR_HW_REV_TYPE_QNJ (0x0000360)
330#define CSR_HW_REV_TYPE_QNJ_B0 (0x0000364) 330#define CSR_HW_REV_TYPE_QNJ_B0 (0x0000364)
331#define CSR_HW_REV_TYPE_QU_B0 (0x0000334)
332#define CSR_HW_REV_TYPE_QU_C0 (0x0000338)
331#define CSR_HW_REV_TYPE_QUZ (0x0000354) 333#define CSR_HW_REV_TYPE_QUZ (0x0000354)
332#define CSR_HW_REV_TYPE_HR_CDB (0x0000340) 334#define CSR_HW_REV_TYPE_HR_CDB (0x0000340)
333#define CSR_HW_REV_TYPE_SO (0x0000370) 335#define CSR_HW_REV_TYPE_SO (0x0000370)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index ccc83fd74649..ea2a03d4bf55 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -604,6 +604,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
604 {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)}, 604 {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)},
605 {IWL_PCI_DEVICE(0x2526, 0x4234, iwl9560_2ac_cfg_soc)}, 605 {IWL_PCI_DEVICE(0x2526, 0x4234, iwl9560_2ac_cfg_soc)},
606 {IWL_PCI_DEVICE(0x2526, 0x42A4, iwl9462_2ac_cfg_soc)}, 606 {IWL_PCI_DEVICE(0x2526, 0x42A4, iwl9462_2ac_cfg_soc)},
607 {IWL_PCI_DEVICE(0x2526, 0x6014, iwl9260_2ac_160_cfg)},
607 {IWL_PCI_DEVICE(0x2526, 0x8014, iwl9260_2ac_160_cfg)}, 608 {IWL_PCI_DEVICE(0x2526, 0x8014, iwl9260_2ac_160_cfg)},
608 {IWL_PCI_DEVICE(0x2526, 0x8010, iwl9260_2ac_160_cfg)}, 609 {IWL_PCI_DEVICE(0x2526, 0x8010, iwl9260_2ac_160_cfg)},
609 {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_160_cfg)}, 610 {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_160_cfg)},
@@ -971,6 +972,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
971 {IWL_PCI_DEVICE(0x7A70, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, 972 {IWL_PCI_DEVICE(0x7A70, 0x0310, iwlax211_2ax_cfg_so_gf_a0)},
972 {IWL_PCI_DEVICE(0x7A70, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, 973 {IWL_PCI_DEVICE(0x7A70, 0x0510, iwlax211_2ax_cfg_so_gf_a0)},
973 {IWL_PCI_DEVICE(0x7A70, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, 974 {IWL_PCI_DEVICE(0x7A70, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)},
975 {IWL_PCI_DEVICE(0x7AF0, 0x0090, iwlax211_2ax_cfg_so_gf_a0)},
974 {IWL_PCI_DEVICE(0x7AF0, 0x0310, iwlax211_2ax_cfg_so_gf_a0)}, 976 {IWL_PCI_DEVICE(0x7AF0, 0x0310, iwlax211_2ax_cfg_so_gf_a0)},
975 {IWL_PCI_DEVICE(0x7AF0, 0x0510, iwlax211_2ax_cfg_so_gf_a0)}, 977 {IWL_PCI_DEVICE(0x7AF0, 0x0510, iwlax211_2ax_cfg_so_gf_a0)},
976 {IWL_PCI_DEVICE(0x7AF0, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)}, 978 {IWL_PCI_DEVICE(0x7AF0, 0x0A10, iwlax211_2ax_cfg_so_gf_a0)},
@@ -1037,6 +1039,27 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1037 } 1039 }
1038 iwl_trans->cfg = cfg; 1040 iwl_trans->cfg = cfg;
1039 } 1041 }
1042
1043 /*
1044 * This is a hack to switch from Qu B0 to Qu C0. We need to
1045 * do this for all cfgs that use Qu B0. All this code is in
1046 * urgent need for a refactor, but for now this is the easiest
1047 * thing to do to support Qu C-step.
1048 */
1049 if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_QU_C0) {
1050 if (iwl_trans->cfg == &iwl_ax101_cfg_qu_hr)
1051 iwl_trans->cfg = &iwl_ax101_cfg_qu_c0_hr_b0;
1052 else if (iwl_trans->cfg == &iwl_ax201_cfg_qu_hr)
1053 iwl_trans->cfg = &iwl_ax201_cfg_qu_c0_hr_b0;
1054 else if (iwl_trans->cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0)
1055 iwl_trans->cfg = &iwl9461_2ac_cfg_qu_c0_jf_b0;
1056 else if (iwl_trans->cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0)
1057 iwl_trans->cfg = &iwl9462_2ac_cfg_qu_c0_jf_b0;
1058 else if (iwl_trans->cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0)
1059 iwl_trans->cfg = &iwl9560_2ac_cfg_qu_c0_jf_b0;
1060 else if (iwl_trans->cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0)
1061 iwl_trans->cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0;
1062 }
1040#endif 1063#endif
1041 1064
1042 pci_set_drvdata(pdev, iwl_trans); 1065 pci_set_drvdata(pdev, iwl_trans);
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
index 67b81c7221c4..7e3a621b9c0d 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -372,15 +372,10 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
372 struct queue_entry *entry = (struct queue_entry *)urb->context; 372 struct queue_entry *entry = (struct queue_entry *)urb->context;
373 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 373 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
374 374
375 if (!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) 375 if (!test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
376 return; 376 return;
377 377
378 /* 378 /*
379 * Report the frame as DMA done
380 */
381 rt2x00lib_dmadone(entry);
382
383 /*
384 * Check if the received data is simply too small 379 * Check if the received data is simply too small
385 * to be actually valid, or if the urb is signaling 380 * to be actually valid, or if the urb is signaling
386 * a problem. 381 * a problem.
@@ -389,6 +384,11 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
389 set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); 384 set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
390 385
391 /* 386 /*
387 * Report the frame as DMA done
388 */
389 rt2x00lib_dmadone(entry);
390
391 /*
392 * Schedule the delayed work for reading the RX status 392 * Schedule the delayed work for reading the RX status
393 * from the device. 393 * from the device.
394 */ 394 */