diff --git a/include/kernel-6.1 b/include/kernel-6.1 index aff3a753b..88ea72699 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .19 -LINUX_KERNEL_HASH-6.1.19 = 9e991c6e5f6c1ca45eea98c55e82ef6ae3dccc73b3e8a655c8665e585f5a8647 +LINUX_VERSION-6.1 = .20 +LINUX_KERNEL_HASH-6.1.20 = 76322de8c01a3c63b42c4d1e9b9e7d1897ddb91276e10d73d1f9df3562f031f0 diff --git a/target/linux/generic/backport-6.1/101-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users-d.patch b/target/linux/generic/backport-6.1/101-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users-d.patch index 559b41244..e19ff22f1 100644 --- a/target/linux/generic/backport-6.1/101-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users-d.patch +++ b/target/linux/generic/backport-6.1/101-net-Remove-the-obsolte-u64_stats_fetch_-_irq-users-d.patch @@ -1155,7 +1155,7 @@ Signed-off-by: Jakub Kicinski stats->tx_bytes = _bytes; --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -865,7 +865,7 @@ static void mtk_get_stats64(struct net_d +@@ -866,7 +866,7 @@ static void mtk_get_stats64(struct net_d } do { @@ -1164,7 +1164,7 @@ Signed-off-by: Jakub Kicinski storage->rx_packets = hw_stats->rx_packets; storage->tx_packets = hw_stats->tx_packets; storage->rx_bytes = hw_stats->rx_bytes; -@@ -877,7 +877,7 @@ static void mtk_get_stats64(struct net_d +@@ -878,7 +878,7 @@ static void mtk_get_stats64(struct net_d storage->rx_crc_errors = hw_stats->rx_fcs_errors; storage->rx_errors = hw_stats->rx_checksum_errors; storage->tx_aborted_errors = hw_stats->tx_skip; @@ -1173,7 +1173,7 @@ Signed-off-by: Jakub Kicinski storage->tx_errors = dev->stats.tx_errors; storage->rx_dropped = dev->stats.rx_dropped; -@@ -3707,13 +3707,13 @@ static void mtk_get_ethtool_stats(struct +@@ -3708,13 +3708,13 @@ static void mtk_get_ethtool_stats(struct do { data_dst = data; diff --git a/target/linux/generic/hack-6.1/773-bgmac-add-srab-switch.patch b/target/linux/generic/hack-6.1/773-bgmac-add-srab-switch.patch index 63903e267..633cacd1e 100644 --- a/target/linux/generic/hack-6.1/773-bgmac-add-srab-switch.patch +++ b/target/linux/generic/hack-6.1/773-bgmac-add-srab-switch.patch @@ -50,9 +50,9 @@ Signed-off-by: Hauke Mehrtens /************************************************** * 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); @@ -65,7 +65,7 @@ Signed-off-by: Hauke Mehrtens 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) { @@ -86,7 +86,7 @@ Signed-off-by: Hauke Mehrtens struct bgmac_slot_info { union { -@@ -493,6 +494,9 @@ struct bgmac { +@@ -495,6 +496,9 @@ struct bgmac { void (*cmn_maskset32)(struct bgmac *bgmac, u16 offset, u32 mask, u32 set); int (*phy_connect)(struct bgmac *bgmac); diff --git a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch index f9a3a48c0..6a135f17e 100644 --- a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch @@ -29,7 +29,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1164,6 +1166,11 @@ static const struct usb_device_id option +@@ -1165,6 +1167,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, diff --git a/target/linux/generic/hack-6.1/902-debloat_proc.patch b/target/linux/generic/hack-6.1/902-debloat_proc.patch index 18a04d30a..e0d970017 100644 --- a/target/linux/generic/hack-6.1/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.1/902-debloat_proc.patch @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau --- a/fs/locks.c +++ b/fs/locks.c -@@ -2908,6 +2908,8 @@ static const struct seq_operations locks +@@ -2909,6 +2909,8 @@ static const struct seq_operations locks static int __init proc_locks_init(void) { @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -4087,6 +4087,8 @@ static __net_initdata struct pernet_oper +@@ -4088,6 +4088,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/hack-6.1/952-add-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-6.1/952-add-net-conntrack-events-support-multiple-registrant.patch index 15876e7f4..725232b59 100644 --- a/target/linux/generic/hack-6.1/952-add-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-6.1/952-add-net-conntrack-events-support-multiple-registrant.patch @@ -299,7 +299,7 @@ Signed-off-by: Zhi Chen void nf_conntrack_ecache_work(struct net *net, enum nf_ct_ecache_state state) --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c -@@ -717,12 +717,19 @@ static size_t ctnetlink_nlmsg_size(const +@@ -718,12 +718,19 @@ static size_t ctnetlink_nlmsg_size(const } static int diff --git a/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index e80bab4b9..ccd4bf08c 100644 --- a/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2858,8 +2858,8 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -2859,8 +2859,8 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -2871,8 +2871,8 @@ static irqreturn_t mtk_handle_irq_tx(int +@@ -2872,8 +2872,8 @@ static irqreturn_t mtk_handle_irq_tx(int eth->tx_events++; if (likely(napi_schedule_prep(ð->tx_napi))) { @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -4193,6 +4193,8 @@ static int mtk_probe(struct platform_dev +@@ -4194,6 +4194,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-6.1/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-6.1/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch index 06642ec86..b2a759ba1 100644 --- a/target/linux/generic/pending-6.1/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch +++ b/target/linux/generic/pending-6.1/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch @@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2196,6 +2196,10 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2199,6 +2199,10 @@ mt7530_setup(struct dsa_switch *ds) return -ENODEV; } diff --git a/target/linux/generic/pending-6.1/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch b/target/linux/generic/pending-6.1/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch index 0cd7f5dba..3a723324f 100644 --- a/target/linux/generic/pending-6.1/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch +++ b/target/linux/generic/pending-6.1/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -938,7 +938,7 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -939,7 +939,7 @@ static int mtk_init_fq_dma(struct mtk_et { const struct mtk_soc_data *soc = eth->soc; dma_addr_t phy_ring_tail; @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau dma_addr_t dma_addr; int i; -@@ -2202,19 +2202,25 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2203,19 +2203,25 @@ static int mtk_tx_alloc(struct mtk_eth * struct mtk_tx_ring *ring = ð->tx_ring; int i, sz = soc->txrx.txd_size; struct mtk_tx_dma_v2 *txd; @@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau u32 next_ptr = ring->phys + next * sz; txd = ring->dma + i * sz; -@@ -2234,22 +2240,22 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2235,22 +2241,22 @@ static int mtk_tx_alloc(struct mtk_eth * * descriptors in ring->dma_pdma. */ if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau ring->thresh = MAX_SKB_FRAGS; /* make sure that all changes to the dma ring are flushed before we -@@ -2261,14 +2267,14 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2262,14 +2268,14 @@ static int mtk_tx_alloc(struct mtk_eth * mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr); mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr); mtk_w32(eth, @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau mtk_w32(eth, 0, MT7628_TX_CTX_IDX0); mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx); } -@@ -2286,7 +2292,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2287,7 +2293,7 @@ static void mtk_tx_clean(struct mtk_eth int i; if (ring->buf) { @@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau mtk_tx_unmap(eth, &ring->buf[i], NULL, false); kfree(ring->buf); ring->buf = NULL; -@@ -2294,14 +2300,14 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2295,14 +2301,14 @@ static void mtk_tx_clean(struct mtk_eth if (ring->dma) { dma_free_coherent(eth->dma_dev, @@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau ring->dma_pdma, ring->phys_pdma); ring->dma_pdma = NULL; } -@@ -2823,7 +2829,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -2824,7 +2830,7 @@ static void mtk_dma_free(struct mtk_eth netdev_reset_queue(eth->netdev[i]); if (eth->scratch_ring) { dma_free_coherent(eth->dma_dev, diff --git a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch index 2e0f9b8b0..e8fa8339a 100644 --- a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch +++ b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4269,7 +4269,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4270,7 +4270,7 @@ static const struct mtk_soc_data mt7621_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau .hash_offset = 2, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { -@@ -4308,7 +4308,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4309,7 +4309,7 @@ static const struct mtk_soc_data mt7623_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, diff --git a/target/linux/generic/pending-6.1/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch b/target/linux/generic/pending-6.1/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch index 8a979284c..f10e3ec60 100644 --- a/target/linux/generic/pending-6.1/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch +++ b/target/linux/generic/pending-6.1/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau }, .gdm1_cnt = 0x1c00, .gdma_to_ppe = 0x3333, -@@ -613,6 +617,75 @@ static void mtk_mac_link_down(struct phy +@@ -614,6 +618,75 @@ static void mtk_mac_link_down(struct phy mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); } @@ -130,7 +130,7 @@ Signed-off-by: Felix Fietkau static void mtk_mac_link_up(struct phylink_config *config, struct phy_device *phy, unsigned int mode, phy_interface_t interface, -@@ -638,6 +711,8 @@ static void mtk_mac_link_up(struct phyli +@@ -639,6 +712,8 @@ static void mtk_mac_link_up(struct phyli break; } @@ -139,7 +139,7 @@ Signed-off-by: Felix Fietkau /* Configure duplex */ if (duplex == DUPLEX_FULL) mcr |= MAC_MCR_FORCE_DPX; -@@ -1099,7 +1174,8 @@ static void mtk_tx_set_dma_desc_v1(struc +@@ -1100,7 +1175,8 @@ static void mtk_tx_set_dma_desc_v1(struc WRITE_ONCE(desc->txd1, info->addr); @@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau if (info->last) data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); -@@ -1133,9 +1209,6 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1134,9 +1210,6 @@ static void mtk_tx_set_dma_desc_v2(struc data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); @@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */ data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); WRITE_ONCE(desc->txd4, data); -@@ -1179,11 +1252,12 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1180,11 +1253,12 @@ static int mtk_tx_map(struct sk_buff *sk .gso = gso, .csum = skb->ip_summed == CHECKSUM_PARTIAL, .vlan = skb_vlan_tag_present(skb), @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau struct mtk_mac *mac = netdev_priv(dev); struct mtk_eth *eth = mac->hw; const struct mtk_soc_data *soc = eth->soc; -@@ -1191,8 +1265,10 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1192,8 +1266,10 @@ static int mtk_tx_map(struct sk_buff *sk struct mtk_tx_dma *itxd_pdma, *txd_pdma; struct mtk_tx_buf *itx_buf, *tx_buf; int i, n_desc = 1; @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau itxd = ring->next_free; itxd_pdma = qdma_to_pdma(ring, itxd); if (itxd == ring->last_free) -@@ -1241,7 +1317,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1242,7 +1318,7 @@ static int mtk_tx_map(struct sk_buff *sk memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); txd_info.size = min_t(unsigned int, frag_size, soc->txrx.dma_max_len); @@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 && !(frag_size - txd_info.size); txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag, -@@ -1280,7 +1356,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1281,7 +1357,7 @@ static int mtk_tx_map(struct sk_buff *sk txd_pdma->txd2 |= TX_DMA_LS1; } @@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau skb_tx_timestamp(skb); ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2); -@@ -1292,8 +1368,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1293,8 +1369,7 @@ static int mtk_tx_map(struct sk_buff *sk wmb(); if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { @@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr); } else { int next_idx; -@@ -1362,7 +1437,7 @@ static void mtk_wake_queue(struct mtk_et +@@ -1363,7 +1438,7 @@ static void mtk_wake_queue(struct mtk_et for (i = 0; i < MTK_MAC_COUNT; i++) { if (!eth->netdev[i]) continue; @@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau } } -@@ -1386,7 +1461,7 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1387,7 +1462,7 @@ static netdev_tx_t mtk_start_xmit(struct tx_num = mtk_cal_txd_req(eth, skb); if (unlikely(atomic_read(&ring->free_count) <= tx_num)) { @@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau netif_err(eth, tx_queued, dev, "Tx Ring full when queue awake!\n"); spin_unlock(ð->page_lock); -@@ -1412,7 +1487,7 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1413,7 +1488,7 @@ static netdev_tx_t mtk_start_xmit(struct goto drop; if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) @@ -239,7 +239,7 @@ Signed-off-by: Felix Fietkau spin_unlock(ð->page_lock); -@@ -1579,10 +1654,12 @@ static int mtk_xdp_submit_frame(struct m +@@ -1580,10 +1655,12 @@ static int mtk_xdp_submit_frame(struct m struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf); const struct mtk_soc_data *soc = eth->soc; struct mtk_tx_ring *ring = ð->tx_ring; @@ -252,7 +252,7 @@ Signed-off-by: Felix Fietkau }; int err, index = 0, n_desc = 1, nr_frags; struct mtk_tx_buf *htx_buf, *tx_buf; -@@ -1632,6 +1709,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1633,6 +1710,7 @@ static int mtk_xdp_submit_frame(struct m memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); txd_info.size = skb_frag_size(&sinfo->frags[index]); txd_info.last = index + 1 == nr_frags; @@ -260,7 +260,7 @@ Signed-off-by: Felix Fietkau data = skb_frag_address(&sinfo->frags[index]); index++; -@@ -1986,8 +2064,46 @@ rx_done: +@@ -1987,8 +2065,46 @@ rx_done: return done; } @@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau { const struct mtk_reg_map *reg_map = eth->soc->reg_map; struct mtk_tx_ring *ring = ð->tx_ring; -@@ -2019,12 +2135,9 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2020,12 +2136,9 @@ static int mtk_poll_tx_qdma(struct mtk_e break; if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { @@ -323,7 +323,7 @@ Signed-off-by: Felix Fietkau budget--; } mtk_tx_unmap(eth, tx_buf, &bq, true); -@@ -2043,7 +2156,7 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2044,7 +2157,7 @@ static int mtk_poll_tx_qdma(struct mtk_e } static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget, @@ -332,7 +332,7 @@ Signed-off-by: Felix Fietkau { struct mtk_tx_ring *ring = ð->tx_ring; struct mtk_tx_buf *tx_buf; -@@ -2061,12 +2174,8 @@ static int mtk_poll_tx_pdma(struct mtk_e +@@ -2062,12 +2175,8 @@ static int mtk_poll_tx_pdma(struct mtk_e break; if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { @@ -347,7 +347,7 @@ Signed-off-by: Felix Fietkau budget--; } mtk_tx_unmap(eth, tx_buf, &bq, true); -@@ -2088,26 +2197,15 @@ static int mtk_poll_tx(struct mtk_eth *e +@@ -2089,26 +2198,15 @@ static int mtk_poll_tx(struct mtk_eth *e { struct mtk_tx_ring *ring = ð->tx_ring; struct dim_sample dim_sample = {}; @@ -379,7 +379,7 @@ Signed-off-by: Felix Fietkau dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes, &dim_sample); -@@ -2117,7 +2215,7 @@ static int mtk_poll_tx(struct mtk_eth *e +@@ -2118,7 +2216,7 @@ static int mtk_poll_tx(struct mtk_eth *e (atomic_read(&ring->free_count) > ring->thresh)) mtk_wake_queue(eth); @@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau } static void mtk_handle_status_irq(struct mtk_eth *eth) -@@ -2203,6 +2301,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2204,6 +2302,7 @@ static int mtk_tx_alloc(struct mtk_eth * int i, sz = soc->txrx.txd_size; struct mtk_tx_dma_v2 *txd; int ring_size; @@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) ring_size = MTK_QDMA_RING_SIZE; -@@ -2270,8 +2369,25 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2271,8 +2370,25 @@ static int mtk_tx_alloc(struct mtk_eth * ring->phys + ((ring_size - 1) * sz), soc->reg_map->qdma.crx_ptr); mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr); @@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau } else { mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); -@@ -2938,7 +3054,7 @@ static int mtk_start_dma(struct mtk_eth +@@ -2939,7 +3055,7 @@ static int mtk_start_dma(struct mtk_eth if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) val |= MTK_MUTLI_CNT | MTK_RESV_BUF | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | @@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau else val |= MTK_RX_BT_32DWORDS; mtk_w32(eth, val, reg_map->qdma.glo_cfg); -@@ -2984,6 +3100,45 @@ static void mtk_gdm_config(struct mtk_et +@@ -2985,6 +3101,45 @@ static void mtk_gdm_config(struct mtk_et mtk_w32(eth, 0, MTK_RST_GL); } @@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau static int mtk_open(struct net_device *dev) { struct mtk_mac *mac = netdev_priv(dev); -@@ -3026,7 +3181,8 @@ static int mtk_open(struct net_device *d +@@ -3027,7 +3182,8 @@ static int mtk_open(struct net_device *d refcount_inc(ð->dma_refcnt); phylink_start(mac->phylink); @@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3561,8 +3717,12 @@ static int mtk_unreg_dev(struct mtk_eth +@@ -3562,8 +3718,12 @@ static int mtk_unreg_dev(struct mtk_eth int i; for (i = 0; i < MTK_MAC_COUNT; i++) { @@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau unregister_netdev(eth->netdev[i]); } -@@ -3778,6 +3938,23 @@ static int mtk_set_rxnfc(struct net_devi +@@ -3779,6 +3939,23 @@ static int mtk_set_rxnfc(struct net_devi return ret; } @@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau static const struct ethtool_ops mtk_ethtool_ops = { .get_link_ksettings = mtk_get_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings, -@@ -3813,6 +3990,7 @@ static const struct net_device_ops mtk_n +@@ -3814,6 +3991,7 @@ static const struct net_device_ops mtk_n .ndo_setup_tc = mtk_eth_setup_tc, .ndo_bpf = mtk_xdp, .ndo_xdp_xmit = mtk_xdp_xmit, @@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau }; static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) -@@ -3822,6 +4000,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -3823,6 +4001,7 @@ static int mtk_add_mac(struct mtk_eth *e struct phylink *phylink; struct mtk_mac *mac; int id, err; @@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau if (!_id) { dev_err(eth->dev, "missing mac id\n"); -@@ -3839,7 +4018,10 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -3840,7 +4019,10 @@ static int mtk_add_mac(struct mtk_eth *e return -EINVAL; } @@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau if (!eth->netdev[id]) { dev_err(eth->dev, "alloc_etherdev failed\n"); return -ENOMEM; -@@ -3936,6 +4118,11 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -3937,6 +4119,11 @@ static int mtk_add_mac(struct mtk_eth *e else eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; @@ -628,7 +628,7 @@ Signed-off-by: Felix Fietkau /* PDMA on MT7628 */ #define TX_DMA_DONE BIT(31) -@@ -930,6 +949,7 @@ struct mtk_reg_map { +@@ -931,6 +950,7 @@ struct mtk_reg_map { } pdma; struct { u32 qtx_cfg; /* tx queue configuration */ @@ -636,7 +636,7 @@ Signed-off-by: Felix Fietkau u32 rx_ptr; /* rx base pointer */ u32 rx_cnt_cfg; /* rx max count configuration */ u32 qcrx_ptr; /* rx cpu pointer */ -@@ -947,6 +967,7 @@ struct mtk_reg_map { +@@ -948,6 +968,7 @@ struct mtk_reg_map { u32 fq_tail; /* fq tail pointer */ u32 fq_count; /* fq free page count */ u32 fq_blen; /* fq free page buffer length */ @@ -644,7 +644,7 @@ Signed-off-by: Felix Fietkau } qdma; u32 gdm1_cnt; u32 gdma_to_ppe; -@@ -1138,6 +1159,7 @@ struct mtk_mac { +@@ -1139,6 +1160,7 @@ struct mtk_mac { __be32 hwlro_ip[MTK_MAX_LRO_IP_CNT]; int hwlro_ip_cnt; unsigned int syscfg0; diff --git a/target/linux/generic/pending-6.1/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch b/target/linux/generic/pending-6.1/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch index 8c711ba80..98199d1e8 100644 --- a/target/linux/generic/pending-6.1/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch +++ b/target/linux/generic/pending-6.1/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -895,7 +895,13 @@ enum mkt_eth_capabilities { +@@ -896,7 +896,13 @@ enum mkt_eth_capabilities { #define MTK_MUX_GMAC12_TO_GEPHY_SGMII \ (MTK_ETH_MUX_GMAC12_TO_GEPHY_SGMII | MTK_MUX) diff --git a/target/linux/generic/pending-6.1/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/pending-6.1/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch index 266dd662e..8c82ba575 100644 --- a/target/linux/generic/pending-6.1/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch +++ b/target/linux/generic/pending-6.1/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #include "mtk_eth_soc.h" #include "mtk_wed.h" -@@ -2015,16 +2016,22 @@ static int mtk_poll_rx(struct napi_struc +@@ -2016,16 +2017,22 @@ static int mtk_poll_rx(struct napi_struc htons(RX_DMA_VPID(trxd.rxd4)), RX_DMA_VID(trxd.rxd4)); } else if (trxd.rxd2 & RX_DMA_VTAG) { @@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau } skb_record_rx_queue(skb, 0); -@@ -2849,15 +2856,30 @@ static netdev_features_t mtk_fix_feature +@@ -2850,15 +2857,30 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau } /* wait for DMA to finish whatever it is doing before we start using it again */ -@@ -3139,11 +3161,45 @@ found: +@@ -3140,11 +3162,45 @@ found: return NOTIFY_DONE; } @@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { -@@ -3506,6 +3562,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3507,6 +3563,10 @@ static int mtk_hw_init(struct mtk_eth *e */ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); @@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau /* Enable RX VLan Offloading */ mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); -@@ -3709,6 +3769,12 @@ static int mtk_free_dev(struct mtk_eth * +@@ -3710,6 +3770,12 @@ static int mtk_free_dev(struct mtk_eth * free_netdev(eth->netdev[i]); } @@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau /* CDMP Ingress Control Register */ #define MTK_CDMP_IG_CTRL 0x400 #define MTK_CDMP_STAG_EN BIT(0) -@@ -1139,6 +1145,8 @@ struct mtk_eth { +@@ -1140,6 +1146,8 @@ struct mtk_eth { int ip_align; diff --git a/target/linux/generic/pending-6.1/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-6.1/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch index 5f32218bb..ec7cd02f0 100644 --- a/target/linux/generic/pending-6.1/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch +++ b/target/linux/generic/pending-6.1/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1442,12 +1442,28 @@ static void mtk_wake_queue(struct mtk_et +@@ -1443,12 +1443,28 @@ static void mtk_wake_queue(struct mtk_et } } @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau bool gso = false; int tx_num; -@@ -1469,6 +1485,17 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1470,6 +1486,17 @@ static netdev_tx_t mtk_start_xmit(struct return NETDEV_TX_BUSY; } @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau /* TSO: fill MSS info in tcp checksum field */ if (skb_is_gso(skb)) { if (skb_cow_head(skb, 0)) { -@@ -1484,8 +1511,13 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1485,8 +1512,13 @@ static netdev_tx_t mtk_start_xmit(struct } } diff --git a/target/linux/generic/pending-6.1/732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch b/target/linux/generic/pending-6.1/732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch index 6f75e7b2b..ab2ea7c1c 100644 --- a/target/linux/generic/pending-6.1/732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch +++ b/target/linux/generic/pending-6.1/732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2041,29 +2041,16 @@ static int mtk_poll_rx(struct napi_struc +@@ -2042,29 +2042,16 @@ static int mtk_poll_rx(struct napi_struc if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) mtk_ppe_check_skb(eth->ppe[0], skb, hash); @@ -50,7 +50,7 @@ Signed-off-by: Felix Fietkau } skb_record_rx_queue(skb, 0); -@@ -2888,29 +2875,11 @@ static netdev_features_t mtk_fix_feature +@@ -2889,29 +2876,11 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3209,30 +3178,6 @@ static int mtk_open(struct net_device *d +@@ -3210,30 +3179,6 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, -@@ -3271,6 +3216,35 @@ static int mtk_open(struct net_device *d +@@ -3272,6 +3217,35 @@ static int mtk_open(struct net_device *d phylink_start(mac->phylink); netif_tx_start_all_queues(dev); @@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3597,10 +3571,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3598,10 +3572,9 @@ static int mtk_hw_init(struct mtk_eth *e if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { val = mtk_r32(eth, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); @@ -160,7 +160,7 @@ Signed-off-by: Felix Fietkau /* set interrupt delays based on current Net DIM sample */ mtk_dim_rx(ð->rx_dim.work); -@@ -4204,7 +4177,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4205,7 +4178,7 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->vlan_features = eth->soc->hw_features & diff --git a/target/linux/generic/pending-6.1/994-add-quectel-rm500u-support.patch b/target/linux/generic/pending-6.1/994-add-quectel-rm500u-support.patch index ca320e2bc..495cfbc9f 100644 --- a/target/linux/generic/pending-6.1/994-add-quectel-rm500u-support.patch +++ b/target/linux/generic/pending-6.1/994-add-quectel-rm500u-support.patch @@ -1,8 +1,6 @@ -diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c -index 6b69d05e2..a50391b0a 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -266,6 +266,7 @@ +@@ -264,6 +264,7 @@ static void option_instat_callback(struc #define QUECTEL_PRODUCT_EM12 0x0512 #define QUECTEL_PRODUCT_RM500Q 0x0800 #define QUECTEL_PRODUCT_RM520N 0x0801 @@ -10,11 +8,11 @@ index 6b69d05e2..a50391b0a 100644 #define QUECTEL_PRODUCT_EC200U 0x0901 #define QUECTEL_PRODUCT_EC200S_CN 0x6002 #define QUECTEL_PRODUCT_EC200T 0x6026 -@@ -1207,6 +1208,7 @@ +@@ -1202,6 +1203,7 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500U, 0xff, 0x00, 0x00) }, - + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, diff --git a/target/linux/rockchip/patches-6.1/013-v6.3-net-phy-motorcomm-change-the-phy-id-of.patch b/target/linux/rockchip/patches-6.1/013-v6.3-net-phy-motorcomm-change-the-phy-id-of.patch index 01ec856f6..ac67c1d62 100644 --- a/target/linux/rockchip/patches-6.1/013-v6.3-net-phy-motorcomm-change-the-phy-id-of.patch +++ b/target/linux/rockchip/patches-6.1/013-v6.3-net-phy-motorcomm-change-the-phy-id-of.patch @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski /* YT8521/YT8531S Register Overview * UTP Register space | FIBER Register space -@@ -1804,7 +1804,7 @@ static const struct mdio_device_id __maybe_unused motorcomm_tbl[] = { +@@ -1804,7 +1804,7 @@ static const struct mdio_device_id __may { PHY_ID_MATCH_EXACT(PHY_ID_YT8511) }, { PHY_ID_MATCH_EXACT(PHY_ID_YT8521) }, { PHY_ID_MATCH_EXACT(PHY_ID_YT8531S) }, diff --git a/target/linux/rockchip/patches-6.1/015-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8521.patch b/target/linux/rockchip/patches-6.1/015-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8521.patch index 2814beaed..6d89fae84 100644 --- a/target/linux/rockchip/patches-6.1/015-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8521.patch +++ b/target/linux/rockchip/patches-6.1/015-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8521.patch @@ -60,11 +60,10 @@ Signed-off-by: David S. Miller struct yt8521_priv { /* combo_advertising is used for case of YT8521 in combo mode, * this means that yt8521 may work in utp or fiber mode which depends -@@ -640,6 +633,142 @@ static int yt8521_write_page(struct phy_device *phydev, int page) - return ytphy_modify_ext(phydev, YT8521_REG_SPACE_SELECT_REG, mask, set); +@@ -641,6 +634,142 @@ static int yt8521_write_page(struct phy_ }; -+/** + /** + * struct ytphy_cfg_reg_map - map a config value to a register value + * @cfg: value in device configuration + * @reg: value in the register @@ -200,10 +199,11 @@ Signed-off-by: David S. Miller + return ytphy_modify_ext(phydev, YT8521_RGMII_CONFIG1_REG, mask, val); +} + - /** ++/** * yt8521_probe() - read chip config then set suitable polling_mode * @phydev: a pointer to a &struct phy_device -@@ -648,9 +777,12 @@ static int yt8521_write_page(struct phy_device *phydev, int page) + * +@@ -648,9 +777,12 @@ static int yt8521_write_page(struct phy_ */ static int yt8521_probe(struct phy_device *phydev) { @@ -216,7 +216,7 @@ Signed-off-by: David S. Miller int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); -@@ -695,7 +827,45 @@ static int yt8521_probe(struct phy_device *phydev) +@@ -695,7 +827,45 @@ static int yt8521_probe(struct phy_devic return ret; } @@ -263,7 +263,7 @@ Signed-off-by: David S. Miller } /** -@@ -1180,61 +1350,36 @@ static int yt8521_resume(struct phy_device *phydev) +@@ -1180,61 +1350,36 @@ static int yt8521_resume(struct phy_devi */ static int yt8521_config_init(struct phy_device *phydev) { diff --git a/target/linux/rockchip/patches-6.1/016-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8531s.patch b/target/linux/rockchip/patches-6.1/016-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8531s.patch index 9c679b26a..86fc04695 100644 --- a/target/linux/rockchip/patches-6.1/016-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8531s.patch +++ b/target/linux/rockchip/patches-6.1/016-v6.3-net-phy-Add-dts-support-for-Motorcomm-yt8531s.patch @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller /* Extended Register end */ -@@ -858,7 +856,32 @@ static int yt8521_probe(struct phy_device *phydev) +@@ -858,7 +856,32 @@ static int yt8521_probe(struct phy_devic return -EINVAL; } } else if (phydev->drv->phy_id == PHY_ID_YT8531S) { @@ -62,11 +62,10 @@ Signed-off-by: David S. Miller } else { phydev_warn(phydev, "PHY id err\n"); return -EINVAL; -@@ -868,26 +891,6 @@ static int yt8521_probe(struct phy_device *phydev) - val); +@@ -869,26 +892,6 @@ static int yt8521_probe(struct phy_devic } --/** + /** - * yt8531s_probe() - read chip config then set suitable polling_mode - * @phydev: a pointer to a &struct phy_device - * @@ -86,10 +85,11 @@ Signed-off-by: David S. Miller - return yt8521_probe(phydev); -} - - /** +-/** * ytphy_utp_read_lpa() - read LPA then setup lp_advertising for utp * @phydev: a pointer to a &struct phy_device -@@ -1970,7 +1973,7 @@ static struct phy_driver motorcomm_phy_drvs[] = { + * +@@ -1970,7 +1973,7 @@ static struct phy_driver motorcomm_phy_d PHY_ID_MATCH_EXACT(PHY_ID_YT8531S), .name = "YT8531S Gigabit Ethernet", .get_features = yt8521_get_features, diff --git a/target/linux/rockchip/patches-6.1/017-v6.3-net-phy-Add-driver-for-Motorcomm-yt8531-gigabit.patch b/target/linux/rockchip/patches-6.1/017-v6.3-net-phy-Add-driver-for-Motorcomm-yt8531-gigabit.patch index c8477593e..223459d8f 100644 --- a/target/linux/rockchip/patches-6.1/017-v6.3-net-phy-Add-driver-for-Motorcomm-yt8531-gigabit.patch +++ b/target/linux/rockchip/patches-6.1/017-v6.3-net-phy-Add-driver-for-Motorcomm-yt8531-gigabit.patch @@ -28,8 +28,6 @@ Signed-off-by: David S. Miller config NATIONAL_PHY tristate "National Semiconductor PHYs" -diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c -index bdc6a55d59f19..ee7c37dfdca01 100644 --- a/drivers/net/phy/motorcomm.c +++ b/drivers/net/phy/motorcomm.c @@ -1,6 +1,6 @@ @@ -48,7 +46,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644 #define PHY_ID_YT8531S 0x4f51e91a /* YT8521/YT8531S Register Overview -@@ -517,6 +518,61 @@ static int ytphy_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) +@@ -517,6 +518,61 @@ err_restore_page: return phy_restore_page(phydev, old_page, ret); } @@ -110,7 +108,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644 static int yt8511_read_page(struct phy_device *phydev) { return __phy_read(phydev, YT8511_PAGE_SELECT); -@@ -767,6 +823,17 @@ static int ytphy_rgmii_clk_delay_config(struct phy_device *phydev) +@@ -767,6 +823,17 @@ static int ytphy_rgmii_clk_delay_config( return ytphy_modify_ext(phydev, YT8521_RGMII_CONFIG1_REG, mask, val); } @@ -128,7 +126,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644 /** * yt8521_probe() - read chip config then set suitable polling_mode * @phydev: a pointer to a &struct phy_device -@@ -891,6 +958,43 @@ static int yt8521_probe(struct phy_device *phydev) +@@ -891,6 +958,43 @@ static int yt8521_probe(struct phy_devic val); } @@ -172,7 +170,7 @@ index bdc6a55d59f19..ee7c37dfdca01 100644 /** * ytphy_utp_read_lpa() - read LPA then setup lp_advertising for utp * @phydev: a pointer to a &struct phy_device -@@ -1387,6 +1491,94 @@ static int yt8521_config_init(struct phy_device *phydev) +@@ -1387,6 +1491,94 @@ err_restore_page: return phy_restore_page(phydev, old_page, ret); } @@ -267,11 +265,10 @@ index bdc6a55d59f19..ee7c37dfdca01 100644 /** * yt8521_prepare_fiber_features() - A small helper function that setup * fiber's features. -@@ -1969,6 +2161,17 @@ static struct phy_driver motorcomm_phy_drvs[] = { - .suspend = yt8521_suspend, +@@ -1970,6 +2162,17 @@ static struct phy_driver motorcomm_phy_d .resume = yt8521_resume, }, -+ { + { + PHY_ID_MATCH_EXACT(PHY_ID_YT8531), + .name = "YT8531 Gigabit Ethernet", + .probe = yt8531_probe, @@ -282,10 +279,11 @@ index bdc6a55d59f19..ee7c37dfdca01 100644 + .set_wol = yt8531_set_wol, + .link_change_notify = yt8531_link_change_notify, + }, - { ++ { PHY_ID_MATCH_EXACT(PHY_ID_YT8531S), .name = "YT8531S Gigabit Ethernet", -@@ -1990,7 +2193,7 @@ static struct phy_driver motorcomm_phy_drvs[] = { + .get_features = yt8521_get_features, +@@ -1990,7 +2193,7 @@ static struct phy_driver motorcomm_phy_d module_phy_driver(motorcomm_phy_drvs); diff --git a/target/linux/rockchip/patches-6.1/018-v6.3-net-phy-motorcomm-uninitialized-variables-in.patch b/target/linux/rockchip/patches-6.1/018-v6.3-net-phy-motorcomm-uninitialized-variables-in.patch index 16ff9a215..29ae86dbb 100644 --- a/target/linux/rockchip/patches-6.1/018-v6.3-net-phy-motorcomm-uninitialized-variables-in.patch +++ b/target/linux/rockchip/patches-6.1/018-v6.3-net-phy-motorcomm-uninitialized-variables-in.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/phy/motorcomm.c +++ b/drivers/net/phy/motorcomm.c -@@ -1533,10 +1533,10 @@ static int yt8531_config_init(struct phy_device *phydev) +@@ -1533,10 +1533,10 @@ static int yt8531_config_init(struct phy static void yt8531_link_change_notify(struct phy_device *phydev) { struct device_node *node = phydev->mdio.dev.of_node;