aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch
diff options
context:
space:
mode:
authorJohn Audia <therealgraysky@proton.me>2023-03-18 12:46:48 -0400
committerHauke Mehrtens <hauke@hauke-m.de>2023-03-25 16:01:23 +0100
commitd59d69f9e1cb5bb8a11aba023b09550bc9c0ed35 (patch)
treece7bfb758162870c51b6214911ef602e736f2cbc /target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch
parent95cae498b6ab4613a0b4915393c798c750dac396 (diff)
downloadupstream-d59d69f9e1cb5bb8a11aba023b09550bc9c0ed35.tar.gz
upstream-d59d69f9e1cb5bb8a11aba023b09550bc9c0ed35.tar.bz2
upstream-d59d69f9e1cb5bb8a11aba023b09550bc9c0ed35.zip
kernel: bump 5.15 to 5.15.103
Manually rebased: backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch Removed upstreamed: backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch[1] backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch[2] backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch[3] backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch[4] backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch[5] pending-5.15/733-02-net-ethernet-mtk_eth_soc-fix-RX-data-corruption-issu.patch[6] bcm47xx/patches-5.15/170-bgmac-fix-initial-chip-reset-to-support-BCM5358.patch[7] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=51b99dc38c1a053e2e732d7f9e2740e343ae7eae 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=451c9d7b16169645ed291ebb2ca9844caa088f2d 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=97f005c0bdbaf656a7808586d234965385a06c58 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=1c27fab243333821375e4d63128d60093fdbe149 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=4441a90091931fd81607567961dc122f24f735bb 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=2adc29350a5b4669544566f71f208d2abaec60ab 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.103&id=04bfc5bcdfc0fdb73587487c71b04d63807ae15a Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
Diffstat (limited to 'target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch')
-rw-r--r--target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch b/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch
index 345c6bed01..58b49f28a2 100644
--- a/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch
+++ b/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch
@@ -15,7 +15,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
-@@ -987,15 +987,26 @@ static void mtk_tx_unmap(struct mtk_eth
+@@ -988,15 +988,26 @@ static void mtk_tx_unmap(struct mtk_eth
}
}
@@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static void setup_tx_buf(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf,
-@@ -1012,7 +1023,7 @@ static void setup_tx_buf(struct mtk_eth
+@@ -1013,7 +1024,7 @@ static void setup_tx_buf(struct mtk_eth
dma_unmap_addr_set(tx_buf, dma_addr1, mapped_addr);
dma_unmap_len_set(tx_buf, dma_len1, size);
} else {
@@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
txd->txd1 = mapped_addr;
txd->txd2 = TX_DMA_PLEN0(size);
dma_unmap_addr_set(tx_buf, dma_addr0, mapped_addr);
-@@ -1188,7 +1199,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1189,7 +1200,7 @@ static int mtk_tx_map(struct sk_buff *sk
soc->txrx.txd_size);
if (new_desc)
memset(tx_buf, 0, sizeof(*tx_buf));
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
tx_buf->flags |= MTK_TX_FLAGS_PAGE0;
tx_buf->flags |= (!mac->id) ? MTK_TX_FLAGS_FPORT0 :
MTK_TX_FLAGS_FPORT1;
-@@ -1202,7 +1213,8 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1203,7 +1214,8 @@ static int mtk_tx_map(struct sk_buff *sk
}
/* store skb to cleanup */
@@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
if (k & 0x1)
-@@ -1414,13 +1426,14 @@ static struct page_pool *mtk_create_page
+@@ -1415,13 +1427,14 @@ static struct page_pool *mtk_create_page
.pool_size = size,
.nid = NUMA_NO_NODE,
.dev = eth->dma_dev,
@@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
pp = page_pool_create(&pp_params);
if (IS_ERR(pp))
return pp;
-@@ -1466,6 +1479,122 @@ static void mtk_rx_put_buff(struct mtk_r
+@@ -1467,6 +1480,122 @@ static void mtk_rx_put_buff(struct mtk_r
skb_free_frag(data);
}
@@ -216,7 +216,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static u32 mtk_xdp_run(struct mtk_eth *eth, struct mtk_rx_ring *ring,
struct xdp_buff *xdp, struct net_device *dev)
{
-@@ -1494,6 +1623,18 @@ static u32 mtk_xdp_run(struct mtk_eth *e
+@@ -1495,6 +1624,18 @@ static u32 mtk_xdp_run(struct mtk_eth *e
count = &hw_stats->xdp_stats.rx_xdp_redirect;
goto update_stats;
@@ -235,7 +235,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
default:
bpf_warn_invalid_xdp_action(act);
fallthrough;
-@@ -1727,9 +1868,8 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1728,9 +1869,8 @@ static int mtk_poll_tx_qdma(struct mtk_e
{
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
struct mtk_tx_ring *ring = &eth->tx_ring;
@@ -246,7 +246,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 cpu, dma;
cpu = ring->last_free_ptr;
-@@ -1750,15 +1890,21 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1751,15 +1891,21 @@ static int mtk_poll_tx_qdma(struct mtk_e
if (tx_buf->flags & MTK_TX_FLAGS_FPORT1)
mac = 1;
@@ -271,7 +271,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_tx_unmap(eth, tx_buf, true);
ring->last_free = desc;
-@@ -1777,9 +1923,8 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -1778,9 +1924,8 @@ static int mtk_poll_tx_pdma(struct mtk_e
unsigned int *done, unsigned int *bytes)
{
struct mtk_tx_ring *ring = &eth->tx_ring;
@@ -282,7 +282,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 cpu, dma;
cpu = ring->cpu_idx;
-@@ -1787,14 +1932,18 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -1788,14 +1933,18 @@ static int mtk_poll_tx_pdma(struct mtk_e
while ((cpu != dma) && budget) {
tx_buf = &ring->buf[cpu];
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
mtk_tx_unmap(eth, tx_buf, true);
-@@ -3477,6 +3626,7 @@ static const struct net_device_ops mtk_n
+@@ -3478,6 +3627,7 @@ static const struct net_device_ops mtk_n
#endif
.ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp,
@@ -314,7 +314,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
-@@ -693,6 +693,12 @@ enum mtk_dev_state {
+@@ -694,6 +694,12 @@ enum mtk_dev_state {
MTK_RESETTING
};
@@ -327,7 +327,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* struct mtk_tx_buf - This struct holds the pointers to the memory pointed at
* by the TX descriptor s
* @skb: The SKB pointer of the packet being sent
-@@ -702,7 +708,9 @@ enum mtk_dev_state {
+@@ -703,7 +709,9 @@ enum mtk_dev_state {
* @dma_len1: The length of the second segment
*/
struct mtk_tx_buf {