diff options
Diffstat (limited to 'target/linux/generic/backport-5.15/706-01-v6.0-net-ethernet-mtk_eth_soc-add-basic-XDP-support.patch')
-rw-r--r-- | target/linux/generic/backport-5.15/706-01-v6.0-net-ethernet-mtk_eth_soc-add-basic-XDP-support.patch | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/target/linux/generic/backport-5.15/706-01-v6.0-net-ethernet-mtk_eth_soc-add-basic-XDP-support.patch b/target/linux/generic/backport-5.15/706-01-v6.0-net-ethernet-mtk_eth_soc-add-basic-XDP-support.patch index f03f6a3a41..d94bdabd71 100644 --- a/target/linux/generic/backport-5.15/706-01-v6.0-net-ethernet-mtk_eth_soc-add-basic-XDP-support.patch +++ b/target/linux/generic/backport-5.15/706-01-v6.0-net-ethernet-mtk_eth_soc-add-basic-XDP-support.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1388,6 +1388,11 @@ static void mtk_update_rx_cpu_idx(struct +@@ -1389,6 +1389,11 @@ static void mtk_update_rx_cpu_idx(struct } } @@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static struct page_pool *mtk_create_page_pool(struct mtk_eth *eth, struct xdp_rxq_info *xdp_q, int id, int size) -@@ -1450,11 +1455,52 @@ static void mtk_rx_put_buff(struct mtk_r +@@ -1451,11 +1456,52 @@ static void mtk_rx_put_buff(struct mtk_r skb_free_frag(data); } @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int idx; struct sk_buff *skb; u8 *data, *new_data; -@@ -1463,9 +1509,9 @@ static int mtk_poll_rx(struct napi_struc +@@ -1464,9 +1510,9 @@ static int mtk_poll_rx(struct napi_struc while (done < budget) { unsigned int pktlen, *rxdcsum; @@ -94,7 +94,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> int mac = 0; ring = mtk_get_rx_ring(eth); -@@ -1495,8 +1541,14 @@ static int mtk_poll_rx(struct napi_struc +@@ -1496,8 +1542,14 @@ static int mtk_poll_rx(struct napi_struc if (unlikely(test_bit(MTK_RESETTING, ð->state))) goto release_desc; @@ -109,7 +109,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> new_data = mtk_page_pool_get_buff(ring->page_pool, &dma_addr, GFP_ATOMIC); -@@ -1504,6 +1556,34 @@ static int mtk_poll_rx(struct napi_struc +@@ -1505,6 +1557,34 @@ static int mtk_poll_rx(struct napi_struc netdev->stats.rx_dropped++; goto release_desc; } @@ -144,7 +144,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } else { if (ring->frag_size <= PAGE_SIZE) new_data = napi_alloc_frag(ring->frag_size); -@@ -1527,27 +1607,20 @@ static int mtk_poll_rx(struct napi_struc +@@ -1528,27 +1608,20 @@ static int mtk_poll_rx(struct napi_struc dma_unmap_single(eth->dma_dev, trxd.rxd1, ring->buf_size, DMA_FROM_DEVICE); @@ -181,7 +181,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) rxdcsum = &trxd.rxd3; -@@ -1559,7 +1632,6 @@ static int mtk_poll_rx(struct napi_struc +@@ -1560,7 +1633,6 @@ static int mtk_poll_rx(struct napi_struc else skb_checksum_none_assert(skb); skb->protocol = eth_type_trans(skb, netdev); @@ -189,7 +189,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> hash = trxd.rxd4 & MTK_RXD4_FOE_ENTRY; if (hash != MTK_RXD4_FOE_ENTRY) { -@@ -1622,6 +1694,9 @@ rx_done: +@@ -1623,6 +1695,9 @@ rx_done: &dim_sample); net_dim(ð->rx_dim, dim_sample); @@ -199,7 +199,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> return done; } -@@ -1967,7 +2042,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -1968,7 +2043,7 @@ static int mtk_rx_alloc(struct mtk_eth * if (!ring->data) return -ENOMEM; @@ -208,7 +208,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> struct page_pool *pp; pp = mtk_create_page_pool(eth, &ring->xdp_q, ring_no, -@@ -2709,6 +2784,48 @@ static int mtk_stop(struct net_device *d +@@ -2710,6 +2785,48 @@ static int mtk_stop(struct net_device *d return 0; } @@ -257,7 +257,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits) { regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, -@@ -3004,6 +3121,12 @@ static int mtk_change_mtu(struct net_dev +@@ -3005,6 +3122,12 @@ static int mtk_change_mtu(struct net_dev struct mtk_eth *eth = mac->hw; u32 mcr_cur, mcr_new; @@ -270,7 +270,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) { mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK; -@@ -3331,6 +3454,7 @@ static const struct net_device_ops mtk_n +@@ -3332,6 +3455,7 @@ static const struct net_device_ops mtk_n .ndo_poll_controller = mtk_poll_controller, #endif .ndo_setup_tc = mtk_eth_setup_tc, @@ -280,7 +280,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -1085,6 +1085,8 @@ struct mtk_eth { +@@ -1086,6 +1086,8 @@ struct mtk_eth { struct mtk_ppe *ppe; struct rhashtable flow_table; |