-LINUX_VERSION-5.10 = .174
-LINUX_KERNEL_HASH-5.10.174 = 2f8a0cd000d5839f0ff44ba0f3b4f9a3253ea5f78ae2a1c7484ad3fb1e8a4a24
+LINUX_VERSION-5.10 = .175
+LINUX_KERNEL_HASH-5.10.175 = e277562e28f234e36665ae12b7585f9557a83a86bc4a8de8840a305af6307bce
+++ /dev/null
-From 327dabbd0111910a7d174b0b812d608d6b67bead Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
-Date: Mon, 8 Aug 2022 23:05:25 +0200
-Subject: [PATCH] bgmac: fix *initial* chip reset to support BCM5358
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-While bringing hardware up we should perform a full reset including the
-switch bit (BGMAC_BCMA_IOCTL_SW_RESET aka SICF_SWRST). It's what
-specification says and what reference driver does.
-
-This seems to be critical for the BCM5358. Without this hardware doesn't
-get initialized properly and doesn't seem to transmit or receive any
-packets.
-
-Originally bgmac was calling bgmac_chip_reset() before setting
-"has_robosw" property which resulted in expected behaviour. That has
-changed as a side effect of adding platform device support which
-regressed BCM5358 support.
-
-Fixes: f6a95a24957a ("net: ethernet: bgmac: Add platform device support")
-Cc: Jon Mason <jdmason@kudzu.us>
-Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
----
- drivers/net/ethernet/broadcom/bgmac.c | 8 ++++++--
- drivers/net/ethernet/broadcom/bgmac.h | 2 ++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bgmac.c
-+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -891,13 +891,13 @@ static void bgmac_chip_reset_idm_config(
-
- if (iost & BGMAC_BCMA_IOST_ATTACHED) {
- flags = BGMAC_BCMA_IOCTL_SW_CLKEN;
-- if (!bgmac->has_robosw)
-+ if (bgmac->in_init || !bgmac->has_robosw)
- flags |= BGMAC_BCMA_IOCTL_SW_RESET;
- }
- bgmac_clk_enable(bgmac, flags);
- }
-
-- if (iost & BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw)
-+ if (iost & BGMAC_BCMA_IOST_ATTACHED && (bgmac->in_init || !bgmac->has_robosw))
- bgmac_idm_write(bgmac, BCMA_IOCTL,
- bgmac_idm_read(bgmac, BCMA_IOCTL) &
- ~BGMAC_BCMA_IOCTL_SW_RESET);
-@@ -1502,6 +1502,8 @@ int bgmac_enet_probe(struct bgmac *bgmac
- struct net_device *net_dev = bgmac->net_dev;
- int err;
-
-+ bgmac->in_init = true;
-+
- bgmac_chip_intrs_off(bgmac);
-
- net_dev->irq = bgmac->irq;
-@@ -1562,6 +1564,8 @@ int bgmac_enet_probe(struct bgmac *bgmac
- bgmac->b53_device = &bgmac_b53_dev;
- }
-
-+ bgmac->in_init = false;
-+
- err = register_netdev(bgmac->net_dev);
- if (err) {
- dev_err(bgmac->dev, "Cannot register net device\n");
---- a/drivers/net/ethernet/broadcom/bgmac.h
-+++ b/drivers/net/ethernet/broadcom/bgmac.h
-@@ -513,6 +513,8 @@ struct bgmac {
- int irq;
- u32 int_mask;
-
-+ bool in_init;
-+
- /* Current MAC state */
- int mac_speed;
- int mac_duplex;
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -6812,15 +6812,10 @@ void __netif_napi_del(struct napi_struct
+@@ -6813,15 +6813,10 @@ void __netif_napi_del(struct napi_struct
}
EXPORT_SYMBOL(__netif_napi_del);
weight = n->weight;
/* This NAPI_STATE_SCHED test is for avoiding a race
-@@ -6840,7 +6835,7 @@ static int napi_poll(struct napi_struct
+@@ -6841,7 +6836,7 @@ static int napi_poll(struct napi_struct
n->poll, work, weight);
if (likely(work < weight))
/* Drivers must not modify the NAPI state if they
* consume the entire weight. In such cases this code
-@@ -6849,7 +6844,7 @@ static int napi_poll(struct napi_struct
+@@ -6850,7 +6845,7 @@ static int napi_poll(struct napi_struct
*/
if (unlikely(napi_disable_pending(n))) {
napi_complete(n);
}
if (n->gro_bitmask) {
-@@ -6867,12 +6862,29 @@ static int napi_poll(struct napi_struct
+@@ -6868,12 +6863,29 @@ static int napi_poll(struct napi_struct
if (unlikely(!list_empty(&n->poll_list))) {
pr_warn_once("%s: Budget exhausted after napi rescheduled\n",
n->dev ? n->dev->name : "backlog");
list_add_tail(&napi->poll_list, &sd->poll_list);
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
}
-@@ -6765,6 +6802,12 @@ void netif_napi_add(struct net_device *d
+@@ -6766,6 +6803,12 @@ void netif_napi_add(struct net_device *d
set_bit(NAPI_STATE_NPSVC, &napi->state);
list_add_rcu(&napi->dev_list, &dev->napi_list);
napi_hash_add(napi);
}
EXPORT_SYMBOL(netif_napi_add);
-@@ -6781,9 +6824,28 @@ void napi_disable(struct napi_struct *n)
+@@ -6782,9 +6825,28 @@ void napi_disable(struct napi_struct *n)
hrtimer_cancel(&n->timer);
clear_bit(NAPI_STATE_DISABLE, &n->state);
static void flush_gro_hash(struct napi_struct *napi)
{
int i;
-@@ -6809,6 +6871,11 @@ void __netif_napi_del(struct napi_struct
+@@ -6810,6 +6872,11 @@ void __netif_napi_del(struct napi_struct
flush_gro_hash(napi);
napi->gro_bitmask = 0;
}
EXPORT_SYMBOL(__netif_napi_del);
-@@ -6890,6 +6957,51 @@ static int napi_poll(struct napi_struct
+@@ -6891,6 +6958,51 @@ static int napi_poll(struct napi_struct
return work;
}
* wake_up_process() when it's not NULL.
*/
thread = READ_ONCE(napi->thread);
-@@ -6775,6 +6776,49 @@ static void init_gro_hash(struct napi_st
+@@ -6776,6 +6777,49 @@ static void init_gro_hash(struct napi_st
napi->gro_bitmask = 0;
}
wake_up_process(thread);
return;
}
-@@ -6567,7 +6569,8 @@ bool napi_complete_done(struct napi_stru
+@@ -6568,7 +6570,8 @@ bool napi_complete_done(struct napi_stru
WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED));
/* If STATE_MISSED was set, leave STATE_SCHED set,
* because we will call napi->poll() one more time.
-@@ -7003,16 +7006,25 @@ static int napi_poll(struct napi_struct
+@@ -7004,16 +7007,25 @@ static int napi_poll(struct napi_struct
static int napi_thread_wait(struct napi_struct *napi)
{
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -7010,7 +7010,7 @@ static int napi_thread_wait(struct napi_
+@@ -7011,7 +7011,7 @@ static int napi_thread_wait(struct napi_
set_current_state(TASK_INTERRUPTIBLE);
/* Testing SCHED_THREADED bit here to make sure the current
* kthread owns this napi and could poll on this napi.
* Testing SCHED bit is not enough because SCHED bit might be
-@@ -7028,6 +7028,7 @@ static int napi_thread_wait(struct napi_
+@@ -7029,6 +7029,7 @@ static int napi_thread_wait(struct napi_
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -6821,6 +6821,7 @@ int dev_set_threaded(struct net_device *
+@@ -6822,6 +6822,7 @@ int dev_set_threaded(struct net_device *
return err;
}
#include "mtk_eth_soc.h"
-@@ -1296,13 +1297,12 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1297,13 +1298,12 @@ static int mtk_poll_rx(struct napi_struc
break;
/* find out which mac the packet come from. values start at 1 */
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
!eth->netdev[mac]))
-@@ -2274,6 +2274,9 @@ static void mtk_gdm_config(struct mtk_et
+@@ -2275,6 +2275,9 @@ static void mtk_gdm_config(struct mtk_et
val |= config;
obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2299,7 +2299,10 @@ static int mtk_open(struct net_device *d
+@@ -2300,7 +2300,10 @@ static int mtk_open(struct net_device *d
/* we run 2 netdevs on the same dma ring so we only bring it up once */
if (!refcount_read(ð->dma_refcnt)) {
if (err)
if (err) {
-@@ -2307,7 +2310,10 @@ static int mtk_open(struct net_device *d
+@@ -2308,7 +2311,10 @@ static int mtk_open(struct net_device *d
return err;
}
napi_enable(ð->tx_napi);
napi_enable(ð->rx_napi);
-@@ -2374,6 +2380,9 @@ static int mtk_stop(struct net_device *d
+@@ -2375,6 +2381,9 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
return 0;
}
-@@ -3102,6 +3111,13 @@ static int mtk_probe(struct platform_dev
+@@ -3103,6 +3112,13 @@ static int mtk_probe(struct platform_dev
goto err_free_dev;
}
for (i = 0; i < MTK_MAX_DEVS; i++) {
if (!eth->netdev[i])
continue;
-@@ -3176,6 +3192,7 @@ static const struct mtk_soc_data mt7621_
+@@ -3177,6 +3193,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false,
};
static const struct mtk_soc_data mt7622_data = {
-@@ -3184,6 +3201,7 @@ static const struct mtk_soc_data mt7622_
+@@ -3185,6 +3202,7 @@ static const struct mtk_soc_data mt7622_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false,
#define RX_DMA_L4_VALID BIT(24)
#define RX_DMA_L4_VALID_PDMA BIT(30) /* when PDMA is used */
#define RX_DMA_FPORT_SHIFT 19
-@@ -819,6 +827,7 @@ struct mtk_soc_data {
+@@ -820,6 +828,7 @@ struct mtk_soc_data {
u32 caps;
u32 required_clks;
bool required_pctl;
netdev_features_t hw_features;
};
-@@ -918,6 +927,8 @@ struct mtk_eth {
+@@ -919,6 +928,8 @@ struct mtk_eth {
u32 tx_int_status_reg;
u32 rx_dma_l4_valid;
int ip_align;
obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2858,6 +2858,7 @@ static const struct net_device_ops mtk_n
+@@ -2859,6 +2859,7 @@ static const struct net_device_ops mtk_n
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = mtk_poll_controller,
#endif
};
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
-@@ -3116,6 +3117,10 @@ static int mtk_probe(struct platform_dev
+@@ -3117,6 +3118,10 @@ static int mtk_probe(struct platform_dev
eth->base + MTK_ETH_PPE_BASE, 2);
if (err)
goto err_free_dev;
#define MTK_HW_FEATURES_MT7628 (NETIF_F_SG | NETIF_F_RXCSUM)
#define NEXT_DESP_IDX(X, Y) (((X) + 1) & ((Y) - 1))
-@@ -929,6 +931,7 @@ struct mtk_eth {
+@@ -930,6 +932,7 @@ struct mtk_eth {
int ip_align;
struct mtk_ppe ppe;
};
/* struct mtk_mac - the structure that holds the info about the MACs of the
-@@ -973,4 +976,9 @@ int mtk_gmac_sgmii_path_setup(struct mtk
+@@ -974,4 +977,9 @@ int mtk_gmac_sgmii_path_setup(struct mtk
int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id);
int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1333,6 +1333,9 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1334,6 +1334,9 @@ static int mtk_poll_rx(struct napi_struc
goto release_desc;
}
/* receive data */
skb = build_skb(data, ring->frag_size);
if (unlikely(!skb)) {
-@@ -1342,8 +1345,6 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1343,8 +1346,6 @@ static int mtk_poll_rx(struct napi_struc
}
skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1339,9 +1339,9 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1340,9 +1340,9 @@ static int mtk_poll_rx(struct napi_struc
/* receive data */
skb = build_skb(data, ring->frag_size);
if (unlikely(!skb)) {
}
skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN);
-@@ -1361,6 +1361,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1362,6 +1362,7 @@ static int mtk_poll_rx(struct napi_struc
skb_record_rx_queue(skb, 0);
napi_gro_receive(napi, skb);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -890,7 +890,8 @@ static int txd_to_idx(struct mtk_tx_ring
+@@ -891,7 +891,8 @@ static int txd_to_idx(struct mtk_tx_ring
return ((void *)dma - (void *)ring->dma) / sizeof(*dma);
}
{
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
if (tx_buf->flags & MTK_TX_FLAGS_SINGLE0) {
-@@ -922,8 +923,12 @@ static void mtk_tx_unmap(struct mtk_eth
+@@ -923,8 +924,12 @@ static void mtk_tx_unmap(struct mtk_eth
tx_buf->flags = 0;
if (tx_buf->skb &&
tx_buf->skb = NULL;
}
-@@ -1101,7 +1106,7 @@ err_dma:
+@@ -1102,7 +1107,7 @@ err_dma:
tx_buf = mtk_desc_to_tx_buf(ring, itxd);
/* unmap dma */
itxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
-@@ -1423,7 +1428,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1424,7 +1429,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
done[mac]++;
budget--;
}
ring->last_free = desc;
atomic_inc(&ring->free_count);
-@@ -1460,7 +1465,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -1461,7 +1466,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
budget--;
}
desc = &ring->dma[cpu];
ring->last_free = desc;
-@@ -1662,7 +1667,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -1663,7 +1668,7 @@ static void mtk_tx_clean(struct mtk_eth
if (ring->buf) {
for (i = 0; i < MTK_DMA_SIZE; i++)
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1163,17 +1163,6 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1164,17 +1164,6 @@ static void mtk_wake_queue(struct mtk_et
}
}
static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct mtk_mac *mac = netdev_priv(dev);
-@@ -1194,7 +1183,7 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1195,7 +1184,7 @@ static netdev_tx_t mtk_start_xmit(struct
tx_num = mtk_cal_txd_req(skb);
if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
netif_err(eth, tx_queued, dev,
"Tx Ring full when queue awake!\n");
spin_unlock(ð->page_lock);
-@@ -1220,7 +1209,7 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1221,7 +1210,7 @@ static netdev_tx_t mtk_start_xmit(struct
goto drop;
if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2234,7 +2234,7 @@ static int mtk_start_dma(struct mtk_eth
+@@ -2235,7 +2235,7 @@ static int mtk_start_dma(struct mtk_eth
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
mtk_w32(eth,
MTK_TX_WB_DDONE | MTK_TX_DMA_EN |
MediaTek SoC family.
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1265,12 +1265,13 @@ static void mtk_update_rx_cpu_idx(struct
+@@ -1266,12 +1266,13 @@ static void mtk_update_rx_cpu_idx(struct
static int mtk_poll_rx(struct napi_struct *napi, int budget,
struct mtk_eth *eth)
{
while (done < budget) {
struct net_device *netdev;
-@@ -1347,6 +1348,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1348,6 +1349,7 @@ static int mtk_poll_rx(struct napi_struc
else
skb_checksum_none_assert(skb);
skb->protocol = eth_type_trans(skb, netdev);
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
(trxd.rxd2 & RX_DMA_VTAG))
-@@ -1379,6 +1381,12 @@ rx_done:
+@@ -1380,6 +1382,12 @@ rx_done:
mtk_update_rx_cpu_idx(eth);
}
return done;
}
-@@ -1471,6 +1479,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -1472,6 +1480,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
static int mtk_poll_tx(struct mtk_eth *eth, int budget)
{
struct mtk_tx_ring *ring = ð->tx_ring;
unsigned int done[MTK_MAX_DEVS];
unsigned int bytes[MTK_MAX_DEVS];
int total = 0, i;
-@@ -1488,8 +1497,14 @@ static int mtk_poll_tx(struct mtk_eth *e
+@@ -1489,8 +1498,14 @@ static int mtk_poll_tx(struct mtk_eth *e
continue;
netdev_completed_queue(eth->netdev[i], done[i], bytes[i]);
total += done[i];
if (mtk_queue_stopped(eth) &&
(atomic_read(&ring->free_count) > ring->thresh))
mtk_wake_queue(eth);
-@@ -2170,6 +2185,7 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -2171,6 +2186,7 @@ static irqreturn_t mtk_handle_irq_rx(int
{
struct mtk_eth *eth = _eth;
if (likely(napi_schedule_prep(ð->rx_napi))) {
__napi_schedule(ð->rx_napi);
mtk_rx_irq_disable(eth, MTK_RX_DONE_INT);
-@@ -2182,6 +2198,7 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -2183,6 +2199,7 @@ static irqreturn_t mtk_handle_irq_tx(int
{
struct mtk_eth *eth = _eth;
if (likely(napi_schedule_prep(ð->tx_napi))) {
__napi_schedule(ð->tx_napi);
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
-@@ -2370,6 +2387,9 @@ static int mtk_stop(struct net_device *d
+@@ -2371,6 +2388,9 @@ static int mtk_stop(struct net_device *d
napi_disable(ð->tx_napi);
napi_disable(ð->rx_napi);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
mtk_stop_dma(eth, MTK_QDMA_GLO_CFG);
mtk_stop_dma(eth, MTK_PDMA_GLO_CFG);
-@@ -2422,6 +2442,64 @@ err_disable_clks:
+@@ -2423,6 +2443,64 @@ err_disable_clks:
return ret;
}
static int mtk_hw_init(struct mtk_eth *eth)
{
int i, val, ret;
-@@ -2443,9 +2521,6 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2444,9 +2522,6 @@ static int mtk_hw_init(struct mtk_eth *e
goto err_disable_pm;
}
/* disable delay and normal interrupt */
mtk_tx_irq_disable(eth, ~0);
mtk_rx_irq_disable(eth, ~0);
-@@ -2484,11 +2559,11 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2485,11 +2560,11 @@ static int mtk_hw_init(struct mtk_eth *e
/* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
mtk_tx_irq_disable(eth, ~0);
mtk_rx_irq_disable(eth, ~0);
-@@ -2993,6 +3068,13 @@ static int mtk_probe(struct platform_dev
+@@ -2994,6 +3069,13 @@ static int mtk_probe(struct platform_dev
spin_lock_init(ð->page_lock);
spin_lock_init(ð->tx_irq_lock);
spin_lock_init(ð->rx_irq_lock);
/* QDMA Interrupt grouping registers */
#define MTK_QDMA_INT_GRP1 0x1a20
-@@ -863,6 +869,7 @@ struct mtk_sgmii {
+@@ -864,6 +870,7 @@ struct mtk_sgmii {
* @page_lock: Make sure that register operations are atomic
* @tx_irq__lock: Make sure that IRQ register operations are atomic
* @rx_irq__lock: Make sure that IRQ register operations are atomic
* @dummy_dev: we run 2 netdevs on 1 physical DMA ring and need a
* dummy for NAPI to work
* @netdev: The netdev instances
-@@ -881,6 +888,14 @@ struct mtk_sgmii {
+@@ -882,6 +889,14 @@ struct mtk_sgmii {
* @rx_ring_qdma: Pointer to the memory holding info about the QDMA RX ring
* @tx_napi: The TX NAPI struct
* @rx_napi: The RX NAPI struct
* @scratch_ring: Newer SoCs need memory for a second HW managed TX ring
* @phy_scratch_ring: physical address of scratch_ring
* @scratch_head: The scratch memory that scratch_ring points to.
-@@ -925,6 +940,18 @@ struct mtk_eth {
+@@ -926,6 +941,18 @@ struct mtk_eth {
const struct mtk_soc_data *soc;
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1399,7 +1399,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1400,7 +1400,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
struct mtk_tx_buf *tx_buf;
u32 cpu, dma;
dma = mtk_r32(eth, MTK_QTX_DRX_PTR);
desc = mtk_qdma_phys_to_virt(ring, cpu);
-@@ -1433,6 +1433,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1434,6 +1434,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
cpu = next_cpu;
}
mtk_w32(eth, cpu, MTK_QTX_CRX_PTR);
return budget;
-@@ -1633,6 +1634,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1634,6 +1635,7 @@ static int mtk_tx_alloc(struct mtk_eth *
atomic_set(&ring->free_count, MTK_DMA_SIZE - 2);
ring->next_free = &ring->dma[0];
ring->last_free = &ring->dma[MTK_DMA_SIZE - 1];
ring->thresh = MAX_SKB_FRAGS;
/* make sure that all changes to the dma ring are flushed before we
-@@ -1646,9 +1648,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1647,9 +1649,7 @@ static int mtk_tx_alloc(struct mtk_eth *
mtk_w32(eth,
ring->phys + ((MTK_DMA_SIZE - 1) * sz),
MTK_QTX_CRX_PTR);
} else {
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -656,6 +656,7 @@ struct mtk_tx_buf {
+@@ -657,6 +657,7 @@ struct mtk_tx_buf {
* @phys: The physical addr of tx_buf
* @next_free: Pointer to the next free descriptor
* @last_free: Pointer to the last free descriptor
* @thresh: The threshold of minimum amount of free descriptors
* @free_count: QDMA uses a linked list. Track how many free descriptors
* are present
-@@ -666,6 +667,7 @@ struct mtk_tx_ring {
+@@ -667,6 +668,7 @@ struct mtk_tx_ring {
dma_addr_t phys;
struct mtk_tx_dma *next_free;
struct mtk_tx_dma *last_free;
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -798,13 +798,18 @@ static inline int mtk_max_buf_size(int f
+@@ -799,13 +799,18 @@ static inline int mtk_max_buf_size(int f
return buf_size;
}
}
static void *mtk_max_lro_buf_alloc(gfp_t gfp_mask)
-@@ -1287,8 +1292,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1288,8 +1293,7 @@ static int mtk_poll_rx(struct napi_struc
rxd = &ring->dma[idx];
data = ring->data[idx];
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1554,8 +1554,8 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1555,8 +1555,8 @@ static int mtk_napi_tx(struct napi_struc
if (status & MTK_TX_DONE_INT)
return budget;
return tx_done;
}
-@@ -1588,8 +1588,9 @@ poll_again:
+@@ -1589,8 +1589,9 @@ poll_again:
remain_budget -= rx_done;
goto poll_again;
}
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1531,7 +1531,6 @@ static void mtk_handle_status_irq(struct
+@@ -1532,7 +1532,6 @@ static void mtk_handle_status_irq(struct
static int mtk_napi_tx(struct napi_struct *napi, int budget)
{
struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi);
int tx_done = 0;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
-@@ -1540,21 +1539,19 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1541,21 +1540,19 @@ static int mtk_napi_tx(struct napi_struc
tx_done = mtk_poll_tx(eth, budget);
if (unlikely(netif_msg_intr(eth))) {
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
return tx_done;
-@@ -1563,36 +1560,33 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1564,36 +1561,33 @@ static int mtk_napi_tx(struct napi_struc
static int mtk_napi_rx(struct napi_struct *napi, int budget)
{
struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi);
#include <net/dsa.h>
#include "mtk_eth_soc.h"
-@@ -1282,6 +1283,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1283,6 +1284,7 @@ static int mtk_poll_rx(struct napi_struc
struct net_device *netdev;
unsigned int pktlen;
dma_addr_t dma_addr;
int mac;
ring = mtk_get_rx_ring(eth);
-@@ -1354,6 +1356,12 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1355,6 +1357,12 @@ static int mtk_poll_rx(struct napi_struc
skb->protocol = eth_type_trans(skb, netdev);
bytes += pktlen;
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2074,25 +2074,22 @@ static int mtk_set_features(struct net_d
+@@ -2075,25 +2075,22 @@ static int mtk_set_features(struct net_d
/* wait for DMA to finish whatever it is doing before we start using it again */
static int mtk_dma_busy_wait(struct mtk_eth *eth)
{
mcr_new = mcr_cur;
- mcr_new |= MAC_MCR_MAX_RX_1536 | MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
+ mcr_new |= MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
- MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK;
+ MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK |
+ MAC_MCR_RX_FIFO_CLR_DIS;
- /* Only update control register when needed! */
-@@ -782,8 +782,8 @@ static void mtk_get_stats64(struct net_d
+@@ -783,8 +783,8 @@ static void mtk_get_stats64(struct net_d
static inline int mtk_max_frag_size(int mtu)
{
/* make sure buf_size will be at least MTK_MAX_RX_LENGTH */
return SKB_DATA_ALIGN(MTK_RX_HLEN + mtu) +
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
-@@ -794,7 +794,7 @@ static inline int mtk_max_buf_size(int f
+@@ -795,7 +795,7 @@ static inline int mtk_max_buf_size(int f
int buf_size = frag_size - NET_SKB_PAD - NET_IP_ALIGN -
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
return buf_size;
}
-@@ -2630,6 +2630,35 @@ static void mtk_uninit(struct net_device
+@@ -2631,6 +2631,35 @@ static void mtk_uninit(struct net_device
mtk_rx_irq_disable(eth, ~0);
}
static int mtk_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct mtk_mac *mac = netdev_priv(dev);
-@@ -2926,6 +2955,7 @@ static const struct net_device_ops mtk_n
+@@ -2927,6 +2956,7 @@ static const struct net_device_ops mtk_n
.ndo_set_mac_address = mtk_set_mac_address,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = mtk_do_ioctl,
.ndo_tx_timeout = mtk_tx_timeout,
.ndo_get_stats64 = mtk_get_stats64,
.ndo_fix_features = mtk_fix_features,
-@@ -3028,7 +3058,10 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -3029,7 +3059,10 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->irq = eth->irq[0];
eth->netdev[id]->dev.of_node = np;
}
/*
-@@ -1003,6 +1023,7 @@ static struct sk_buff *__skb_clone(struc
+@@ -1002,6 +1022,7 @@ static struct sk_buff *__skb_clone(struc
n->nohdr = 0;
n->peeked = 0;
C(pfmemalloc);
n->destructor = NULL;
C(tail);
C(end);
-@@ -3421,7 +3442,7 @@ int skb_shift(struct sk_buff *tgt, struc
+@@ -3420,7 +3441,7 @@ int skb_shift(struct sk_buff *tgt, struc
fragto = &skb_shinfo(tgt)->frags[merge];
skb_frag_size_add(fragto, skb_frag_size(fragfrom));
}
/* Reposition in the original skb */
-@@ -5188,6 +5209,20 @@ bool skb_try_coalesce(struct sk_buff *to
+@@ -5187,6 +5208,20 @@ bool skb_try_coalesce(struct sk_buff *to
if (skb_cloned(to))
return false;
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2604,14 +2604,11 @@ static int __init mtk_init(struct net_de
+@@ -2605,14 +2605,11 @@ static int __init mtk_init(struct net_de
{
struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw;
int irq;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5014,7 +5014,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5015,7 +5015,7 @@ int stmmac_dvr_probe(struct device *devi
priv->wol_irq = res->wol_irq;
priv->lpi_irq = res->lpi_irq;
} \
\
/* __*init sections */ \
-@@ -1019,6 +1029,8 @@
+@@ -1024,6 +1034,8 @@
#define COMMON_DISCARDS \
SANITIZER_DISCARDS \
/**************************************************
* MII
**************************************************/
-@@ -1542,6 +1554,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
- /* Omit FCS from max MTU size */
- net_dev->max_mtu = BGMAC_RX_MAX_FRAME_SIZE - ETH_FCS_LEN;
+@@ -1546,6 +1558,14 @@ int bgmac_enet_probe(struct bgmac *bgmac
+
+ bgmac->in_init = false;
+ if ((bgmac->feature_flags & BGMAC_FEAT_SRAB) && !bgmac_b53_pdata.regs) {
+ bgmac_b53_pdata.regs = ioremap(0x18007000, 0x1000);
err = register_netdev(bgmac->net_dev);
if (err) {
dev_err(bgmac->dev, "Cannot register net device\n");
-@@ -1564,6 +1584,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
+@@ -1568,6 +1588,10 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
void bgmac_enet_remove(struct bgmac *bgmac)
{
struct bgmac_slot_info {
union {
-@@ -533,6 +534,9 @@ struct bgmac {
+@@ -535,6 +536,9 @@ struct bgmac {
void (*cmn_maskset32)(struct bgmac *bgmac, u16 offset, u32 mask,
u32 set);
int (*phy_connect)(struct bgmac *bgmac);
if (netif_elide_gro(skb->dev))
goto normal;
-@@ -8047,6 +8050,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -8048,6 +8051,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info,
-@@ -8098,6 +8143,7 @@ static int __netdev_upper_dev_link(struc
+@@ -8099,6 +8144,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
ret = notifier_to_errno(ret);
-@@ -8194,6 +8240,7 @@ static void __netdev_upper_dev_unlink(st
+@@ -8195,6 +8241,7 @@ static void __netdev_upper_dev_unlink(st
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
-@@ -8980,6 +9027,7 @@ int dev_set_mac_address(struct net_devic
+@@ -8981,6 +9028,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/clk.h>
-@@ -832,7 +833,7 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -833,7 +834,7 @@ static int mtk_init_fq_dma(struct mtk_et
dma_addr_t dma_addr;
int i;
cnt * sizeof(struct mtk_tx_dma),
ð->phy_scratch_ring,
GFP_ATOMIC);
-@@ -844,10 +845,10 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -845,10 +846,10 @@ static int mtk_init_fq_dma(struct mtk_et
if (unlikely(!eth->scratch_head))
return -ENOMEM;
return -ENOMEM;
phy_ring_tail = eth->phy_scratch_ring +
-@@ -901,26 +902,26 @@ static void mtk_tx_unmap(struct mtk_eth
+@@ -902,26 +903,26 @@ static void mtk_tx_unmap(struct mtk_eth
{
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
if (tx_buf->flags & MTK_TX_FLAGS_SINGLE0) {
dma_unmap_addr(tx_buf, dma_addr1),
dma_unmap_len(tx_buf, dma_len1),
DMA_TO_DEVICE);
-@@ -998,9 +999,9 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -999,9 +1000,9 @@ static int mtk_tx_map(struct sk_buff *sk
if (skb_vlan_tag_present(skb))
txd4 |= TX_DMA_INS_VLAN | skb_vlan_tag_get(skb);
return -ENOMEM;
WRITE_ONCE(itxd->txd1, mapped_addr);
-@@ -1039,10 +1040,10 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1040,10 +1041,10 @@ static int mtk_tx_map(struct sk_buff *sk
frag_map_size = min(frag_size, MTK_TX_DMA_BUF_LEN);
goto err_dma;
if (i == nr_frags - 1 &&
-@@ -1323,18 +1324,18 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1324,18 +1325,18 @@ static int mtk_poll_rx(struct napi_struc
netdev->stats.rx_dropped++;
goto release_desc;
}
ring->buf_size, DMA_FROM_DEVICE);
/* receive data */
-@@ -1607,7 +1608,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1608,7 +1609,7 @@ static int mtk_tx_alloc(struct mtk_eth *
if (!ring->buf)
goto no_tx_mem;
&ring->phys, GFP_ATOMIC);
if (!ring->dma)
goto no_tx_mem;
-@@ -1625,7 +1626,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1626,7 +1627,7 @@ static int mtk_tx_alloc(struct mtk_eth *
* descriptors in ring->dma_pdma.
*/
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
&ring->phys_pdma,
GFP_ATOMIC);
if (!ring->dma_pdma)
-@@ -1684,7 +1685,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -1685,7 +1686,7 @@ static void mtk_tx_clean(struct mtk_eth
}
if (ring->dma) {
MTK_DMA_SIZE * sizeof(*ring->dma),
ring->dma,
ring->phys);
-@@ -1692,7 +1693,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -1693,7 +1694,7 @@ static void mtk_tx_clean(struct mtk_eth
}
if (ring->dma_pdma) {
MTK_DMA_SIZE * sizeof(*ring->dma_pdma),
ring->dma_pdma,
ring->phys_pdma);
-@@ -1740,18 +1741,18 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -1741,18 +1742,18 @@ static int mtk_rx_alloc(struct mtk_eth *
return -ENOMEM;
}
return -ENOMEM;
ring->dma[i].rxd1 = (unsigned int)dma_addr;
-@@ -1787,7 +1788,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -1788,7 +1789,7 @@ static void mtk_rx_clean(struct mtk_eth
continue;
if (!ring->dma[i].rxd1)
continue;
ring->dma[i].rxd1,
ring->buf_size,
DMA_FROM_DEVICE);
-@@ -1798,7 +1799,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -1799,7 +1800,7 @@ static void mtk_rx_clean(struct mtk_eth
}
if (ring->dma) {
ring->dma_size * sizeof(*ring->dma),
ring->dma,
ring->phys);
-@@ -2154,7 +2155,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -2155,7 +2156,7 @@ static void mtk_dma_free(struct mtk_eth
if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
eth->scratch_ring,
eth->phy_scratch_ring);
-@@ -2506,6 +2507,8 @@ static void mtk_dim_tx(struct work_struc
+@@ -2507,6 +2508,8 @@ static void mtk_dim_tx(struct work_struc
static int mtk_hw_init(struct mtk_eth *eth)
{
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, ð->state))
-@@ -2518,6 +2521,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2519,6 +2522,10 @@ static int mtk_hw_init(struct mtk_eth *e
if (ret)
goto err_disable_pm;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev);
if (ret) {
-@@ -3067,6 +3074,35 @@ free_netdev:
+@@ -3068,6 +3075,35 @@ free_netdev:
return err;
}
static int mtk_probe(struct platform_device *pdev)
{
struct device_node *mac_np;
-@@ -3080,6 +3116,7 @@ static int mtk_probe(struct platform_dev
+@@ -3081,6 +3117,7 @@ static int mtk_probe(struct platform_dev
eth->soc = of_device_get_match_data(&pdev->dev);
eth->dev = &pdev->dev;
eth->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
-@@ -3128,6 +3165,16 @@ static int mtk_probe(struct platform_dev
+@@ -3129,6 +3166,16 @@ static int mtk_probe(struct platform_dev
}
}
GFP_KERNEL);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -456,6 +456,12 @@
+@@ -457,6 +457,12 @@
#define RSTCTRL_FE BIT(6)
#define RSTCTRL_PPE BIT(31)
/* SGMII subsystem config registers */
/* Register to auto-negotiation restart */
#define SGMSYS_PCS_CONTROL_1 0x0
-@@ -873,6 +879,7 @@ struct mtk_sgmii {
+@@ -874,6 +880,7 @@ struct mtk_sgmii {
/* struct mtk_eth - This is the main datasructure for holding the state
* of the driver
* @dev: The device pointer
* @base: The mapped register i/o base
* @page_lock: Make sure that register operations are atomic
* @tx_irq__lock: Make sure that IRQ register operations are atomic
-@@ -916,6 +923,7 @@ struct mtk_sgmii {
+@@ -917,6 +924,7 @@ struct mtk_sgmii {
struct mtk_eth {
struct device *dev;
void __iomem *base;
spinlock_t page_lock;
spinlock_t tx_irq_lock;
-@@ -1014,6 +1022,7 @@ int mtk_gmac_rgmii_path_setup(struct mtk
+@@ -1015,6 +1023,7 @@ int mtk_gmac_rgmii_path_setup(struct mtk
int mtk_eth_offload_init(struct mtk_eth *eth);
int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
void *type_data);
static int mtk_msg_level = -1;
module_param_named(msg_level, mtk_msg_level, int, 0);
-@@ -3197,6 +3198,22 @@ static int mtk_probe(struct platform_dev
+@@ -3198,6 +3199,22 @@ static int mtk_probe(struct platform_dev
}
}
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2329,7 +2329,7 @@ static int mtk_open(struct net_device *d
+@@ -2330,7 +2330,7 @@ static int mtk_open(struct net_device *d
return err;
}
gdm_config = MTK_GDMA_TO_PPE;
mtk_gdm_config(eth, gdm_config);
-@@ -2403,7 +2403,7 @@ static int mtk_stop(struct net_device *d
+@@ -2404,7 +2404,7 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
if (eth->soc->offload_version)
return 0;
}
-@@ -3289,10 +3289,11 @@ static int mtk_probe(struct platform_dev
+@@ -3290,10 +3290,11 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {
if (err)
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -976,7 +976,7 @@ struct mtk_eth {
+@@ -977,7 +977,7 @@ struct mtk_eth {
u32 rx_dma_l4_valid;
int ip_align;
#include <net/dsa.h>
#include "mtk_eth_soc.h"
-@@ -1285,7 +1286,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1286,7 +1287,7 @@ static int mtk_poll_rx(struct napi_struc
struct net_device *netdev;
unsigned int pktlen;
dma_addr_t dma_addr;
int mac;
ring = mtk_get_rx_ring(eth);
-@@ -1364,6 +1365,11 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1365,6 +1366,11 @@ static int mtk_poll_rx(struct napi_struc
skb_set_hash(skb, hash, PKT_HASH_TYPE_L4);
}
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
(trxd.rxd2 & RX_DMA_VTAG))
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
-@@ -3289,7 +3295,7 @@ static int mtk_probe(struct platform_dev
+@@ -3290,7 +3296,7 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2199,8 +2199,8 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -2200,8 +2200,8 @@ static irqreturn_t mtk_handle_irq_rx(int
eth->rx_events++;
if (likely(napi_schedule_prep(ð->rx_napi))) {
}
return IRQ_HANDLED;
-@@ -2212,8 +2212,8 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -2213,8 +2213,8 @@ static irqreturn_t mtk_handle_irq_tx(int
eth->tx_events++;
if (likely(napi_schedule_prep(ð->tx_napi))) {
}
return IRQ_HANDLED;
-@@ -3324,6 +3324,8 @@ static int mtk_probe(struct platform_dev
+@@ -3325,6 +3325,8 @@ static int mtk_probe(struct platform_dev
* for NAPI to work
*/
init_dummy_netdev(ð->dummy_dev);
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
-@@ -4165,6 +4165,15 @@ int skb_gro_receive(struct sk_buff *p, s
+@@ -4164,6 +4164,15 @@ int skb_gro_receive(struct sk_buff *p, s
if (unlikely(p->len + len >= 65536 || NAPI_GRO_CB(skb)->flush))
return -E2BIG;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5047,6 +5047,10 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5048,6 +5048,10 @@ int stmmac_dvr_probe(struct device *devi
reset_control_reset(priv->plat->stmmac_rst);
}
/* Init MAC and get the capabilities */
ret = stmmac_hw_init(priv);
if (ret)
-@@ -5261,6 +5265,7 @@ int stmmac_dvr_remove(struct device *dev
+@@ -5262,6 +5266,7 @@ int stmmac_dvr_remove(struct device *dev
phylink_destroy(priv->phylink);
if (priv->plat->stmmac_rst)
reset_control_assert(priv->plat->stmmac_rst);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2979,6 +2979,7 @@ static const struct net_device_ops mtk_n
+@@ -2980,6 +2980,7 @@ static const struct net_device_ops mtk_n
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
{
const __be32 *_id = of_get_property(np, "reg", NULL);
phy_interface_t phy_mode;
struct phylink *phylink;
-@@ -3074,6 +3075,9 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -3075,6 +3076,9 @@ static int mtk_add_mac(struct mtk_eth *e
else
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;