diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 12c8863579..73639e6b1e 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .142 -LINUX_KERNEL_HASH-5.15.142 = 8d76c95277dc5ab0a6cd0069432af2ceb759d0ac2b6f5401330d390196095676 +LINUX_VERSION-5.15 = .143 +LINUX_KERNEL_HASH-5.15.143 = 096bb16ec07232f27f6a07998c41b655883a8d0a6bb613d39bf524a9ffd99e02 diff --git a/target/linux/ath79/patches-5.15/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/900-unaligned_access_hacks.patch index 84723add3b..13456e119e 100644 --- a/target/linux/ath79/patches-5.15/900-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/900-unaligned_access_hacks.patch @@ -750,7 +750,7 @@ SVN-Revision: 35130 EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4171,14 +4171,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -4175,14 +4175,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch b/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch index 006181495c..eca3c7ff9f 100644 --- a/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch +++ b/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch @@ -747,7 +747,7 @@ Signed-off-by: David S. Miller static void mvpp2_xlg_config(struct mvpp2_port *port, unsigned int mode, --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c -@@ -1168,9 +1168,8 @@ static int otx2_set_link_ksettings(struc +@@ -1172,9 +1172,8 @@ static int otx2_set_link_ksettings(struc otx2_get_link_ksettings(netdev, &cur_ks); /* Check requested modes against supported modes by hardware */ diff --git a/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch b/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch index 3c9d4e72e8..62af99ba31 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue); static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue); -@@ -1712,9 +1715,6 @@ static int __init_dma_rx_desc_rings(stru +@@ -1713,9 +1716,6 @@ static int __init_dma_rx_desc_rings(stru return -ENOMEM; } @@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski /* Setup the chained descriptor addresses */ if (priv->mode == STMMAC_CHAIN_MODE) { if (priv->extend_desc) -@@ -1820,12 +1820,6 @@ static int __init_dma_tx_desc_rings(stru +@@ -1821,12 +1821,6 @@ static int __init_dma_tx_desc_rings(stru tx_q->tx_skbuff[i] = NULL; } @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -2694,10 +2688,7 @@ static void stmmac_tx_err(struct stmmac_ +@@ -2695,10 +2689,7 @@ static void stmmac_tx_err(struct stmmac_ stmmac_stop_tx_dma(priv, chan); dma_free_tx_skbufs(priv, chan); stmmac_clear_tx_descriptors(priv, chan); @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); stmmac_start_tx_dma(priv, chan); -@@ -3781,6 +3772,8 @@ static int stmmac_open(struct net_device +@@ -3782,6 +3773,8 @@ static int stmmac_open(struct net_device } } @@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski ret = stmmac_hw_setup(dev, true); if (ret < 0) { netdev_err(priv->dev, "%s: Hw setup failed\n", __func__); -@@ -6430,6 +6423,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6432,6 +6425,7 @@ void stmmac_enable_rx_queue(struct stmma return; } @@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski stmmac_clear_rx_descriptors(priv, queue); stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, -@@ -6491,6 +6485,7 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6493,6 +6487,7 @@ void stmmac_enable_tx_queue(struct stmma return; } @@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski stmmac_clear_tx_descriptors(priv, queue); stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, -@@ -7411,6 +7406,25 @@ int stmmac_suspend(struct device *dev) +@@ -7417,6 +7412,25 @@ int stmmac_suspend(struct device *dev) } EXPORT_SYMBOL_GPL(stmmac_suspend); @@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski /** * stmmac_reset_queues_param - reset queue parameters * @priv: device pointer -@@ -7421,22 +7435,11 @@ static void stmmac_reset_queues_param(st +@@ -7427,22 +7441,11 @@ static void stmmac_reset_queues_param(st u32 tx_cnt = priv->plat->tx_queues_to_use; u32 queue; diff --git a/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch index 8eca92a5c5..6e115834eb 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -3833,8 +3833,6 @@ static int stmmac_release(struct net_dev +@@ -3834,8 +3834,6 @@ static int stmmac_release(struct net_dev struct stmmac_priv *priv = netdev_priv(dev); u32 chan; @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski if (device_may_wakeup(priv->device)) phylink_speed_down(priv->phylink, false); /* Stop and disconnect the PHY */ -@@ -3846,6 +3844,8 @@ static int stmmac_release(struct net_dev +@@ -3847,6 +3845,8 @@ static int stmmac_release(struct net_dev for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) hrtimer_cancel(&priv->tx_queue[chan].txtimer); diff --git a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch index 34b7e1fd8d..9c609fc5ad 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch @@ -189,7 +189,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->dirty_tx != tx_q->cur_tx) return -EBUSY; /* still unfinished work */ -@@ -1309,7 +1309,7 @@ static void stmmac_display_rx_rings(stru +@@ -1310,7 +1310,7 @@ static void stmmac_display_rx_rings(stru /* Display RX rings */ for (queue = 0; queue < rx_cnt; queue++) { @@ -198,7 +198,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tRX Queue %u rings\n", queue); -@@ -1322,7 +1322,7 @@ static void stmmac_display_rx_rings(stru +@@ -1323,7 +1323,7 @@ static void stmmac_display_rx_rings(stru } /* Display RX ring */ @@ -207,7 +207,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } } -@@ -1336,7 +1336,7 @@ static void stmmac_display_tx_rings(stru +@@ -1337,7 +1337,7 @@ static void stmmac_display_tx_rings(stru /* Display TX rings */ for (queue = 0; queue < tx_cnt; queue++) { @@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tTX Queue %d rings\n", queue); -@@ -1351,7 +1351,7 @@ static void stmmac_display_tx_rings(stru +@@ -1352,7 +1352,7 @@ static void stmmac_display_tx_rings(stru desc_size = sizeof(struct dma_desc); } @@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski tx_q->dma_tx_phy, desc_size); } } -@@ -1392,21 +1392,21 @@ static int stmmac_set_bfsize(int mtu, in +@@ -1393,21 +1393,21 @@ static int stmmac_set_bfsize(int mtu, in */ static void stmmac_clear_rx_descriptors(struct stmmac_priv *priv, u32 queue) { @@ -253,7 +253,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -1418,12 +1418,12 @@ static void stmmac_clear_rx_descriptors( +@@ -1419,12 +1419,12 @@ static void stmmac_clear_rx_descriptors( */ static void stmmac_clear_tx_descriptors(struct stmmac_priv *priv, u32 queue) { @@ -269,7 +269,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1471,7 +1471,7 @@ static void stmmac_clear_descriptors(str +@@ -1472,7 +1472,7 @@ static void stmmac_clear_descriptors(str static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p, int i, gfp_t flags, u32 queue) { @@ -278,7 +278,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->page) { -@@ -1496,7 +1496,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1497,7 +1497,7 @@ static int stmmac_init_rx_buffers(struct buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset; stmmac_set_desc_addr(priv, p, buf->addr); @@ -287,7 +287,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_desc3(priv, p); return 0; -@@ -1510,7 +1510,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1511,7 +1511,7 @@ static int stmmac_init_rx_buffers(struct */ static void stmmac_free_rx_buffer(struct stmmac_priv *priv, u32 queue, int i) { @@ -296,7 +296,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (buf->page) -@@ -1530,7 +1530,7 @@ static void stmmac_free_rx_buffer(struct +@@ -1531,7 +1531,7 @@ static void stmmac_free_rx_buffer(struct */ static void stmmac_free_tx_buffer(struct stmmac_priv *priv, u32 queue, int i) { @@ -305,7 +305,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->tx_skbuff_dma[i].buf && tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) { -@@ -1575,17 +1575,17 @@ static void dma_free_rx_skbufs(struct st +@@ -1576,17 +1576,17 @@ static void dma_free_rx_skbufs(struct st { int i; @@ -326,7 +326,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; int ret; -@@ -1612,10 +1612,10 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1613,10 +1613,10 @@ static int stmmac_alloc_rx_buffers(struc */ static void dma_free_rx_xskbufs(struct stmmac_priv *priv, u32 queue) { @@ -339,7 +339,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->xdp) -@@ -1628,10 +1628,10 @@ static void dma_free_rx_xskbufs(struct s +@@ -1629,10 +1629,10 @@ static void dma_free_rx_xskbufs(struct s static int stmmac_alloc_rx_buffers_zc(struct stmmac_priv *priv, u32 queue) { @@ -352,7 +352,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf; dma_addr_t dma_addr; struct dma_desc *p; -@@ -1674,7 +1674,7 @@ static struct xsk_buff_pool *stmmac_get_ +@@ -1675,7 +1675,7 @@ static struct xsk_buff_pool *stmmac_get_ */ static int __init_dma_rx_desc_rings(struct stmmac_priv *priv, u32 queue, gfp_t flags) { @@ -361,7 +361,7 @@ Signed-off-by: Jakub Kicinski int ret; netif_dbg(priv, probe, priv->dev, -@@ -1720,11 +1720,11 @@ static int __init_dma_rx_desc_rings(stru +@@ -1721,11 +1721,11 @@ static int __init_dma_rx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, rx_q->dma_erx, rx_q->dma_rx_phy, @@ -375,7 +375,7 @@ Signed-off-by: Jakub Kicinski } return 0; -@@ -1751,7 +1751,7 @@ static int init_dma_rx_desc_rings(struct +@@ -1752,7 +1752,7 @@ static int init_dma_rx_desc_rings(struct err_init_rx_buffers: while (queue >= 0) { @@ -384,7 +384,7 @@ Signed-off-by: Jakub Kicinski if (rx_q->xsk_pool) dma_free_rx_xskbufs(priv, queue); -@@ -1780,7 +1780,7 @@ err_init_rx_buffers: +@@ -1781,7 +1781,7 @@ err_init_rx_buffers: */ static int __init_dma_tx_desc_rings(struct stmmac_priv *priv, u32 queue) { @@ -393,7 +393,7 @@ Signed-off-by: Jakub Kicinski int i; netif_dbg(priv, probe, priv->dev, -@@ -1792,16 +1792,16 @@ static int __init_dma_tx_desc_rings(stru +@@ -1793,16 +1793,16 @@ static int __init_dma_tx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, tx_q->dma_etx, tx_q->dma_tx_phy, @@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1871,12 +1871,12 @@ static int init_dma_desc_rings(struct ne +@@ -1872,12 +1872,12 @@ static int init_dma_desc_rings(struct ne */ static void dma_free_tx_skbufs(struct stmmac_priv *priv, u32 queue) { @@ -428,7 +428,7 @@ Signed-off-by: Jakub Kicinski stmmac_free_tx_buffer(priv, queue, i); if (tx_q->xsk_pool && tx_q->xsk_frames_done) { -@@ -1906,7 +1906,7 @@ static void stmmac_free_tx_skbufs(struct +@@ -1907,7 +1907,7 @@ static void stmmac_free_tx_skbufs(struct */ static void __free_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -437,7 +437,7 @@ Signed-off-by: Jakub Kicinski /* Release the DMA RX socket buffers */ if (rx_q->xsk_pool) -@@ -1919,11 +1919,11 @@ static void __free_dma_rx_desc_resources +@@ -1920,11 +1920,11 @@ static void __free_dma_rx_desc_resources /* Free DMA regions of consistent memory previously allocated */ if (!priv->extend_desc) @@ -451,7 +451,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), rx_q->dma_erx, rx_q->dma_rx_phy); -@@ -1952,7 +1952,7 @@ static void free_dma_rx_desc_resources(s +@@ -1953,7 +1953,7 @@ static void free_dma_rx_desc_resources(s */ static void __free_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -460,7 +460,7 @@ Signed-off-by: Jakub Kicinski size_t size; void *addr; -@@ -1970,7 +1970,7 @@ static void __free_dma_tx_desc_resources +@@ -1971,7 +1971,7 @@ static void __free_dma_tx_desc_resources addr = tx_q->dma_tx; } @@ -469,7 +469,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy); -@@ -1999,7 +1999,7 @@ static void free_dma_tx_desc_resources(s +@@ -2000,7 +2000,7 @@ static void free_dma_tx_desc_resources(s */ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -478,7 +478,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; bool xdp_prog = stmmac_xdp_is_enabled(priv); struct page_pool_params pp_params = { 0 }; -@@ -2011,8 +2011,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2012,8 +2012,8 @@ static int __alloc_dma_rx_desc_resources rx_q->priv_data = priv; pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV; @@ -489,7 +489,7 @@ Signed-off-by: Jakub Kicinski pp_params.order = ilog2(num_pages); pp_params.nid = dev_to_node(priv->device); pp_params.dev = priv->device; -@@ -2027,7 +2027,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2028,7 +2028,7 @@ static int __alloc_dma_rx_desc_resources return ret; } @@ -498,7 +498,7 @@ Signed-off-by: Jakub Kicinski sizeof(*rx_q->buf_pool), GFP_KERNEL); if (!rx_q->buf_pool) -@@ -2035,7 +2035,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2036,7 +2036,7 @@ static int __alloc_dma_rx_desc_resources if (priv->extend_desc) { rx_q->dma_erx = dma_alloc_coherent(priv->device, @@ -507,7 +507,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2044,7 +2044,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2045,7 +2045,7 @@ static int __alloc_dma_rx_desc_resources } else { rx_q->dma_rx = dma_alloc_coherent(priv->device, @@ -516,7 +516,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2101,20 +2101,20 @@ err_dma: +@@ -2102,20 +2102,20 @@ err_dma: */ static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -540,7 +540,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct sk_buff *), GFP_KERNEL); if (!tx_q->tx_skbuff) -@@ -2127,7 +2127,7 @@ static int __alloc_dma_tx_desc_resources +@@ -2128,7 +2128,7 @@ static int __alloc_dma_tx_desc_resources else size = sizeof(struct dma_desc); @@ -549,7 +549,7 @@ Signed-off-by: Jakub Kicinski addr = dma_alloc_coherent(priv->device, size, &tx_q->dma_tx_phy, GFP_KERNEL); -@@ -2371,7 +2371,7 @@ static void stmmac_dma_operation_mode(st +@@ -2372,7 +2372,7 @@ static void stmmac_dma_operation_mode(st /* configure all channels */ for (chan = 0; chan < rx_channels_count; chan++) { @@ -558,7 +558,7 @@ Signed-off-by: Jakub Kicinski u32 buf_size; qmode = priv->plat->rx_queues_cfg[chan].mode_to_use; -@@ -2386,7 +2386,7 @@ static void stmmac_dma_operation_mode(st +@@ -2387,7 +2387,7 @@ static void stmmac_dma_operation_mode(st chan); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -567,7 +567,7 @@ Signed-off-by: Jakub Kicinski chan); } } -@@ -2402,7 +2402,7 @@ static void stmmac_dma_operation_mode(st +@@ -2403,7 +2403,7 @@ static void stmmac_dma_operation_mode(st static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget) { struct netdev_queue *nq = netdev_get_tx_queue(priv->dev, queue); @@ -576,7 +576,7 @@ Signed-off-by: Jakub Kicinski struct xsk_buff_pool *pool = tx_q->xsk_pool; unsigned int entry = tx_q->cur_tx; struct dma_desc *tx_desc = NULL; -@@ -2477,7 +2477,7 @@ static bool stmmac_xdp_xmit_zc(struct st +@@ -2478,7 +2478,7 @@ static bool stmmac_xdp_xmit_zc(struct st stmmac_enable_dma_transmission(priv, priv->ioaddr); @@ -585,7 +585,7 @@ Signed-off-by: Jakub Kicinski entry = tx_q->cur_tx; } -@@ -2503,7 +2503,7 @@ static bool stmmac_xdp_xmit_zc(struct st +@@ -2504,7 +2504,7 @@ static bool stmmac_xdp_xmit_zc(struct st */ static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue) { @@ -594,7 +594,7 @@ Signed-off-by: Jakub Kicinski unsigned int bytes_compl = 0, pkts_compl = 0; unsigned int entry, xmits = 0, count = 0; -@@ -2516,7 +2516,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2517,7 +2517,7 @@ static int stmmac_tx_clean(struct stmmac entry = tx_q->dirty_tx; /* Try to clean all TX complete frame in 1 shot */ @@ -603,7 +603,7 @@ Signed-off-by: Jakub Kicinski struct xdp_frame *xdpf; struct sk_buff *skb; struct dma_desc *p; -@@ -2616,7 +2616,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2617,7 +2617,7 @@ static int stmmac_tx_clean(struct stmmac stmmac_release_tx_desc(priv, p, priv->mode); @@ -612,7 +612,7 @@ Signed-off-by: Jakub Kicinski } tx_q->dirty_tx = entry; -@@ -2681,7 +2681,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2682,7 +2682,7 @@ static int stmmac_tx_clean(struct stmmac */ static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan) { @@ -621,7 +621,7 @@ Signed-off-by: Jakub Kicinski netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan)); -@@ -2748,8 +2748,8 @@ static int stmmac_napi_check(struct stmm +@@ -2749,8 +2749,8 @@ static int stmmac_napi_check(struct stmm { int status = stmmac_dma_interrupt_status(priv, priv->ioaddr, &priv->xstats, chan, dir); @@ -632,7 +632,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[chan]; struct napi_struct *rx_napi; struct napi_struct *tx_napi; -@@ -2925,7 +2925,7 @@ static int stmmac_init_dma_engine(struct +@@ -2926,7 +2926,7 @@ static int stmmac_init_dma_engine(struct /* DMA RX Channel Configuration */ for (chan = 0; chan < rx_channels_count; chan++) { @@ -641,7 +641,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, chan); -@@ -2939,7 +2939,7 @@ static int stmmac_init_dma_engine(struct +@@ -2940,7 +2940,7 @@ static int stmmac_init_dma_engine(struct /* DMA TX Channel Configuration */ for (chan = 0; chan < tx_channels_count; chan++) { @@ -650,7 +650,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -2954,7 +2954,7 @@ static int stmmac_init_dma_engine(struct +@@ -2955,7 +2955,7 @@ static int stmmac_init_dma_engine(struct static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue) { @@ -659,7 +659,7 @@ Signed-off-by: Jakub Kicinski hrtimer_start(&tx_q->txtimer, STMMAC_COAL_TIMER(priv->tx_coal_timer[queue]), -@@ -3004,7 +3004,7 @@ static void stmmac_init_coalesce(struct +@@ -3005,7 +3005,7 @@ static void stmmac_init_coalesce(struct u32 chan; for (chan = 0; chan < tx_channel_count; chan++) { @@ -668,7 +668,7 @@ Signed-off-by: Jakub Kicinski priv->tx_coal_frames[chan] = STMMAC_TX_FRAMES; priv->tx_coal_timer[chan] = STMMAC_COAL_TX_TIMER; -@@ -3026,12 +3026,12 @@ static void stmmac_set_rings_length(stru +@@ -3027,12 +3027,12 @@ static void stmmac_set_rings_length(stru /* set TX ring length */ for (chan = 0; chan < tx_channels_count; chan++) stmmac_set_tx_ring_len(priv, priv->ioaddr, @@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -3366,7 +3366,7 @@ static int stmmac_hw_setup(struct net_de +@@ -3367,7 +3367,7 @@ static int stmmac_hw_setup(struct net_de /* Enable TSO */ if (priv->tso) { for (chan = 0; chan < tx_cnt; chan++) { @@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski /* TSO and TBS cannot co-exist */ if (tx_q->tbs & STMMAC_TBS_AVAIL) -@@ -3388,7 +3388,7 @@ static int stmmac_hw_setup(struct net_de +@@ -3389,7 +3389,7 @@ static int stmmac_hw_setup(struct net_de /* TBS */ for (chan = 0; chan < tx_cnt; chan++) { @@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski int enable = tx_q->tbs & STMMAC_TBS_AVAIL; stmmac_enable_tbs(priv, priv->ioaddr, enable, chan); -@@ -3432,7 +3432,7 @@ static void stmmac_free_irq(struct net_d +@@ -3433,7 +3433,7 @@ static void stmmac_free_irq(struct net_d for (j = irq_idx - 1; j >= 0; j--) { if (priv->tx_irq[j] > 0) { irq_set_affinity_hint(priv->tx_irq[j], NULL); @@ -710,7 +710,7 @@ Signed-off-by: Jakub Kicinski } } irq_idx = priv->plat->rx_queues_to_use; -@@ -3441,7 +3441,7 @@ static void stmmac_free_irq(struct net_d +@@ -3442,7 +3442,7 @@ static void stmmac_free_irq(struct net_d for (j = irq_idx - 1; j >= 0; j--) { if (priv->rx_irq[j] > 0) { irq_set_affinity_hint(priv->rx_irq[j], NULL); @@ -719,7 +719,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -3574,7 +3574,7 @@ static int stmmac_request_irq_multi_msi( +@@ -3575,7 +3575,7 @@ static int stmmac_request_irq_multi_msi( sprintf(int_name, "%s:%s-%d", dev->name, "rx", i); ret = request_irq(priv->rx_irq[i], stmmac_msi_intr_rx, @@ -728,7 +728,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(ret < 0)) { netdev_err(priv->dev, "%s: alloc rx-%d MSI %d (error: %d)\n", -@@ -3597,7 +3597,7 @@ static int stmmac_request_irq_multi_msi( +@@ -3598,7 +3598,7 @@ static int stmmac_request_irq_multi_msi( sprintf(int_name, "%s:%s-%d", dev->name, "tx", i); ret = request_irq(priv->tx_irq[i], stmmac_msi_intr_tx, @@ -737,7 +737,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(ret < 0)) { netdev_err(priv->dev, "%s: alloc tx-%d MSI %d (error: %d)\n", -@@ -3728,21 +3728,21 @@ static int stmmac_open(struct net_device +@@ -3729,21 +3729,21 @@ static int stmmac_open(struct net_device bfsize = 0; if (bfsize < BUF_SIZE_16KiB) @@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en; /* Setup per-TXQ tbs flag before TX descriptor alloc */ -@@ -3800,7 +3800,7 @@ irq_error: +@@ -3801,7 +3801,7 @@ irq_error: phylink_stop(priv->phylink); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski stmmac_hw_teardown(dev); init_error: -@@ -3842,7 +3842,7 @@ static int stmmac_release(struct net_dev +@@ -3843,7 +3843,7 @@ static int stmmac_release(struct net_dev stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski netif_tx_disable(dev); -@@ -3906,7 +3906,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3907,7 +3907,7 @@ static bool stmmac_vlan_insert(struct st return false; stmmac_set_tx_owner(priv, p); @@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski return true; } -@@ -3924,7 +3924,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3925,7 +3925,7 @@ static bool stmmac_vlan_insert(struct st static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des, int total_len, bool last_segment, u32 queue) { @@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *desc; u32 buff_size; int tmp_len; -@@ -3935,7 +3935,7 @@ static void stmmac_tso_allocator(struct +@@ -3936,7 +3936,7 @@ static void stmmac_tso_allocator(struct dma_addr_t curr_addr; tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, @@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]); if (tx_q->tbs & STMMAC_TBS_AVAIL) -@@ -3963,7 +3963,7 @@ static void stmmac_tso_allocator(struct +@@ -3964,7 +3964,7 @@ static void stmmac_tso_allocator(struct static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue) { @@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski int desc_size; if (likely(priv->extend_desc)) -@@ -4025,7 +4025,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4026,7 +4026,7 @@ static netdev_tx_t stmmac_tso_xmit(struc dma_addr_t des; int i; @@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski first_tx = tx_q->cur_tx; /* Compute header lengths */ -@@ -4065,7 +4065,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4066,7 +4066,7 @@ static netdev_tx_t stmmac_tso_xmit(struc stmmac_set_mss(priv, mss_desc, mss); tx_q->mss = mss; tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, @@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]); } -@@ -4177,7 +4177,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4178,7 +4178,7 @@ static netdev_tx_t stmmac_tso_xmit(struc * ndo_start_xmit will fill this descriptor the next time it's * called and stmmac_tx_clean may clean up to this descriptor. */ @@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) { netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n", -@@ -4265,7 +4265,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4266,7 +4266,7 @@ static netdev_tx_t stmmac_xmit(struct sk int entry, first_tx; dma_addr_t des; @@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski first_tx = tx_q->cur_tx; if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en) -@@ -4328,7 +4328,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4329,7 +4329,7 @@ static netdev_tx_t stmmac_xmit(struct sk int len = skb_frag_size(frag); bool last_segment = (i == (nfrags - 1)); @@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[entry]); if (likely(priv->extend_desc)) -@@ -4399,7 +4399,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4400,7 +4400,7 @@ static netdev_tx_t stmmac_xmit(struct sk * ndo_start_xmit will fill this descriptor the next time it's * called and stmmac_tx_clean may clean up to this descriptor. */ @@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski tx_q->cur_tx = entry; if (netif_msg_pktdata(priv)) { -@@ -4514,7 +4514,7 @@ static void stmmac_rx_vlan(struct net_de +@@ -4515,7 +4515,7 @@ static void stmmac_rx_vlan(struct net_de */ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue) { @@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski int dirty = stmmac_rx_dirty(priv, queue); unsigned int entry = rx_q->dirty_rx; -@@ -4564,7 +4564,7 @@ static inline void stmmac_rx_refill(stru +@@ -4565,7 +4565,7 @@ static inline void stmmac_rx_refill(stru dma_wmb(); stmmac_set_rx_owner(priv, p, use_rx_wd); @@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski } rx_q->dirty_rx = entry; rx_q->rx_tail_addr = rx_q->dma_rx_phy + -@@ -4592,12 +4592,12 @@ static unsigned int stmmac_rx_buf1_len(s +@@ -4593,12 +4593,12 @@ static unsigned int stmmac_rx_buf1_len(s /* First descriptor, not last descriptor and not split header */ if (status & rx_not_ls) @@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski } static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv, -@@ -4613,7 +4613,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4614,7 +4614,7 @@ static unsigned int stmmac_rx_buf2_len(s /* Not last descriptor */ if (status & rx_not_ls) @@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski plen = stmmac_get_rx_frame_len(priv, p, coe); -@@ -4624,7 +4624,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4625,7 +4625,7 @@ static unsigned int stmmac_rx_buf2_len(s static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue, struct xdp_frame *xdpf, bool dma_map) { @@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski unsigned int entry = tx_q->cur_tx; struct dma_desc *tx_desc; dma_addr_t dma_addr; -@@ -4687,7 +4687,7 @@ static int stmmac_xdp_xmit_xdpf(struct s +@@ -4688,7 +4688,7 @@ static int stmmac_xdp_xmit_xdpf(struct s stmmac_enable_dma_transmission(priv, priv->ioaddr); @@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski tx_q->cur_tx = entry; return STMMAC_XDP_TX; -@@ -4861,7 +4861,7 @@ static void stmmac_dispatch_skb_zc(struc +@@ -4862,7 +4862,7 @@ static void stmmac_dispatch_skb_zc(struc static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget) { @@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski unsigned int entry = rx_q->dirty_rx; struct dma_desc *rx_desc = NULL; bool ret = true; -@@ -4904,7 +4904,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4905,7 +4905,7 @@ static bool stmmac_rx_refill_zc(struct s dma_wmb(); stmmac_set_rx_owner(priv, rx_desc, use_rx_wd); @@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski } if (rx_desc) { -@@ -4919,7 +4919,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4920,7 +4920,7 @@ static bool stmmac_rx_refill_zc(struct s static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue) { @@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski unsigned int count = 0, error = 0, len = 0; int dirty = stmmac_rx_dirty(priv, queue); unsigned int next_entry = rx_q->cur_rx; -@@ -4941,7 +4941,7 @@ static int stmmac_rx_zc(struct stmmac_pr +@@ -4942,7 +4942,7 @@ static int stmmac_rx_zc(struct stmmac_pr desc_size = sizeof(struct dma_desc); } @@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } while (count < limit) { -@@ -4988,7 +4988,7 @@ read_again: +@@ -4989,7 +4989,7 @@ read_again: /* Prefetch the next RX descriptor */ rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx, @@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski next_entry = rx_q->cur_rx; if (priv->extend_desc) -@@ -5109,7 +5109,7 @@ read_again: +@@ -5110,7 +5110,7 @@ read_again: */ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) { @@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned int count = 0, error = 0, len = 0; int status = 0, coe = priv->hw->rx_csum; -@@ -5122,7 +5122,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5123,7 +5123,7 @@ static int stmmac_rx(struct stmmac_priv int buf_sz; dma_dir = page_pool_get_dma_dir(rx_q->page_pool); @@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski if (netif_msg_rx_status(priv)) { void *rx_head; -@@ -5136,7 +5136,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5137,7 +5137,7 @@ static int stmmac_rx(struct stmmac_priv desc_size = sizeof(struct dma_desc); } @@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } while (count < limit) { -@@ -5180,7 +5180,7 @@ read_again: +@@ -5181,7 +5181,7 @@ read_again: break; rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx, @@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski next_entry = rx_q->cur_rx; if (priv->extend_desc) -@@ -5314,7 +5314,7 @@ read_again: +@@ -5315,7 +5315,7 @@ read_again: buf1_len, dma_dir); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, buf->page, buf->page_offset, buf1_len, @@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski /* Data payload appended into SKB */ page_pool_release_page(rx_q->page_pool, buf->page); -@@ -5326,7 +5326,7 @@ read_again: +@@ -5327,7 +5327,7 @@ read_again: buf2_len, dma_dir); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, buf->sec_page, 0, buf2_len, @@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski /* Data payload appended into SKB */ page_pool_release_page(rx_q->page_pool, buf->sec_page); -@@ -5768,11 +5768,13 @@ static irqreturn_t stmmac_safety_interru +@@ -5770,11 +5770,13 @@ static irqreturn_t stmmac_safety_interru static irqreturn_t stmmac_msi_intr_tx(int irq, void *data) { struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data; @@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(!data)) { netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__); -@@ -5812,10 +5814,12 @@ static irqreturn_t stmmac_msi_intr_tx(in +@@ -5814,10 +5816,12 @@ static irqreturn_t stmmac_msi_intr_tx(in static irqreturn_t stmmac_msi_intr_rx(int irq, void *data) { struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data; @@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(!data)) { netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__); -@@ -5846,10 +5850,10 @@ static void stmmac_poll_controller(struc +@@ -5848,10 +5852,10 @@ static void stmmac_poll_controller(struc if (priv->plat->multi_msi_en) { for (i = 0; i < priv->plat->rx_queues_to_use; i++) @@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski } else { disable_irq(dev->irq); stmmac_interrupt(dev->irq, dev); -@@ -6030,34 +6034,34 @@ static int stmmac_rings_status_show(stru +@@ -6032,34 +6036,34 @@ static int stmmac_rings_status_show(stru return 0; for (queue = 0; queue < rx_count; queue++) { @@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -6404,7 +6408,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6406,7 +6410,7 @@ void stmmac_disable_rx_queue(struct stmm void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned long flags; u32 buf_size; -@@ -6441,7 +6445,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6443,7 +6447,7 @@ void stmmac_enable_rx_queue(struct stmma rx_q->queue_index); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski rx_q->queue_index); } -@@ -6467,7 +6471,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6469,7 +6473,7 @@ void stmmac_disable_tx_queue(struct stmm void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned long flags; int ret; -@@ -6517,7 +6521,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6519,7 +6523,7 @@ void stmmac_xdp_release(struct net_devic stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski /* Free the IRQ lines */ stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0); -@@ -6576,7 +6580,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6578,7 +6582,7 @@ int stmmac_xdp_open(struct net_device *d /* DMA RX Channel Configuration */ for (chan = 0; chan < rx_cnt; chan++) { @@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, chan); -@@ -6594,7 +6598,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6596,7 +6600,7 @@ int stmmac_xdp_open(struct net_device *d rx_q->queue_index); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski rx_q->queue_index); } -@@ -6603,7 +6607,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6605,7 +6609,7 @@ int stmmac_xdp_open(struct net_device *d /* DMA TX Channel Configuration */ for (chan = 0; chan < tx_cnt; chan++) { @@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -6636,7 +6640,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6638,7 +6642,7 @@ int stmmac_xdp_open(struct net_device *d irq_error: for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski stmmac_hw_teardown(dev); init_error: -@@ -6663,8 +6667,8 @@ int stmmac_xsk_wakeup(struct net_device +@@ -6665,8 +6669,8 @@ int stmmac_xsk_wakeup(struct net_device queue >= priv->plat->tx_queues_to_use) return -EINVAL; @@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski ch = &priv->channel[queue]; if (!rx_q->xsk_pool && !tx_q->xsk_pool) -@@ -6924,8 +6928,8 @@ int stmmac_reinit_ringparam(struct net_d +@@ -6926,8 +6930,8 @@ int stmmac_reinit_ringparam(struct net_d if (netif_running(dev)) stmmac_release(dev); @@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski if (netif_running(dev)) ret = stmmac_open(dev); -@@ -7357,7 +7361,7 @@ int stmmac_suspend(struct device *dev) +@@ -7362,7 +7366,7 @@ int stmmac_suspend(struct device *dev) stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski if (priv->eee_enabled) { priv->tx_path_in_lpi_mode = false; -@@ -7408,7 +7412,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend); +@@ -7414,7 +7418,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend); static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski rx_q->cur_rx = 0; rx_q->dirty_rx = 0; -@@ -7416,7 +7420,7 @@ static void stmmac_reset_rx_queue(struct +@@ -7422,7 +7426,7 @@ static void stmmac_reset_rx_queue(struct static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1270,7 +1270,7 @@ Signed-off-by: Jakub Kicinski if (i >= priv->plat->tx_queues_to_use) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c -@@ -970,13 +970,13 @@ static int tc_setup_etf(struct stmmac_pr +@@ -971,13 +971,13 @@ static int tc_setup_etf(struct stmmac_pr return -EOPNOTSUPP; if (qopt->queue >= priv->plat->tx_queues_to_use) return -EINVAL; diff --git a/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch b/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch index a7ee50ddd0..57a35d8c19 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -1300,7 +1300,8 @@ static int stmmac_phy_setup(struct stmma +@@ -1301,7 +1301,8 @@ static int stmmac_phy_setup(struct stmma return 0; } @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_cnt = priv->plat->rx_queues_to_use; unsigned int desc_size; -@@ -1309,7 +1310,7 @@ static void stmmac_display_rx_rings(stru +@@ -1310,7 +1311,7 @@ static void stmmac_display_rx_rings(stru /* Display RX rings */ for (queue = 0; queue < rx_cnt; queue++) { @@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tRX Queue %u rings\n", queue); -@@ -1322,12 +1323,13 @@ static void stmmac_display_rx_rings(stru +@@ -1323,12 +1324,13 @@ static void stmmac_display_rx_rings(stru } /* Display RX ring */ @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski { u32 tx_cnt = priv->plat->tx_queues_to_use; unsigned int desc_size; -@@ -1336,7 +1338,7 @@ static void stmmac_display_tx_rings(stru +@@ -1337,7 +1339,7 @@ static void stmmac_display_tx_rings(stru /* Display TX rings */ for (queue = 0; queue < tx_cnt; queue++) { @@ -61,7 +61,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tTX Queue %d rings\n", queue); -@@ -1351,18 +1353,19 @@ static void stmmac_display_tx_rings(stru +@@ -1352,18 +1354,19 @@ static void stmmac_display_tx_rings(stru desc_size = sizeof(struct dma_desc); } @@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski } static int stmmac_set_bfsize(int mtu, int bufsize) -@@ -1386,44 +1389,50 @@ static int stmmac_set_bfsize(int mtu, in +@@ -1387,44 +1390,50 @@ static int stmmac_set_bfsize(int mtu, in /** * stmmac_clear_rx_descriptors - clear RX descriptors * @priv: driver private structure @@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1440,10 +1449,12 @@ static void stmmac_clear_tx_descriptors( +@@ -1441,10 +1450,12 @@ static void stmmac_clear_tx_descriptors( /** * stmmac_clear_descriptors - clear descriptors * @priv: driver private structure @@ -161,7 +161,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_queue_cnt = priv->plat->rx_queues_to_use; u32 tx_queue_cnt = priv->plat->tx_queues_to_use; -@@ -1451,16 +1462,17 @@ static void stmmac_clear_descriptors(str +@@ -1452,16 +1463,17 @@ static void stmmac_clear_descriptors(str /* Clear the RX descriptors */ for (queue = 0; queue < rx_queue_cnt; queue++) @@ -181,7 +181,7 @@ Signed-off-by: Jakub Kicinski * @p: descriptor pointer * @i: descriptor index * @flags: gfp flag -@@ -1468,10 +1480,12 @@ static void stmmac_clear_descriptors(str +@@ -1469,10 +1481,12 @@ static void stmmac_clear_descriptors(str * Description: this function is called to allocate a receive buffer, perform * the DMA mapping and init the descriptor. */ @@ -196,7 +196,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->page) { -@@ -1496,7 +1510,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1497,7 +1511,7 @@ static int stmmac_init_rx_buffers(struct buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset; stmmac_set_desc_addr(priv, p, buf->addr); @@ -205,7 +205,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_desc3(priv, p); return 0; -@@ -1505,12 +1519,13 @@ static int stmmac_init_rx_buffers(struct +@@ -1506,12 +1520,13 @@ static int stmmac_init_rx_buffers(struct /** * stmmac_free_rx_buffer - free RX dma buffers * @priv: private structure @@ -222,7 +222,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (buf->page) -@@ -1525,12 +1540,15 @@ static void stmmac_free_rx_buffer(struct +@@ -1526,12 +1541,15 @@ static void stmmac_free_rx_buffer(struct /** * stmmac_free_tx_buffer - free RX dma buffers * @priv: private structure @@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->tx_skbuff_dma[i].buf && tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) { -@@ -1569,23 +1587,28 @@ static void stmmac_free_tx_buffer(struct +@@ -1570,23 +1588,28 @@ static void stmmac_free_tx_buffer(struct /** * dma_free_rx_skbufs - free RX dma buffers * @priv: private structure @@ -276,7 +276,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; int ret; -@@ -1594,7 +1617,7 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1595,7 +1618,7 @@ static int stmmac_alloc_rx_buffers(struc else p = rx_q->dma_rx + i; @@ -285,7 +285,7 @@ Signed-off-by: Jakub Kicinski queue); if (ret) return ret; -@@ -1608,14 +1631,17 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1609,14 +1632,17 @@ static int stmmac_alloc_rx_buffers(struc /** * dma_free_rx_xskbufs - free RX dma buffers from XSK pool * @priv: private structure @@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->xdp) -@@ -1626,12 +1652,14 @@ static void dma_free_rx_xskbufs(struct s +@@ -1627,12 +1653,14 @@ static void dma_free_rx_xskbufs(struct s } } @@ -324,7 +324,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf; dma_addr_t dma_addr; struct dma_desc *p; -@@ -1666,22 +1694,25 @@ static struct xsk_buff_pool *stmmac_get_ +@@ -1667,22 +1695,25 @@ static struct xsk_buff_pool *stmmac_get_ /** * __init_dma_rx_desc_rings - init the RX descriptor ring (per queue) * @priv: driver private structure @@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski xdp_rxq_info_unreg_mem_model(&rx_q->xdp_rxq); -@@ -1708,9 +1739,9 @@ static int __init_dma_rx_desc_rings(stru +@@ -1709,9 +1740,9 @@ static int __init_dma_rx_desc_rings(stru /* RX XDP ZC buffer pool may not be populated, e.g. * xdpsock TX-only. */ @@ -365,7 +365,7 @@ Signed-off-by: Jakub Kicinski if (ret < 0) return -ENOMEM; } -@@ -1720,17 +1751,19 @@ static int __init_dma_rx_desc_rings(stru +@@ -1721,17 +1752,19 @@ static int __init_dma_rx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, rx_q->dma_erx, rx_q->dma_rx_phy, @@ -388,7 +388,7 @@ Signed-off-by: Jakub Kicinski { struct stmmac_priv *priv = netdev_priv(dev); u32 rx_count = priv->plat->rx_queues_to_use; -@@ -1742,7 +1775,7 @@ static int init_dma_rx_desc_rings(struct +@@ -1743,7 +1776,7 @@ static int init_dma_rx_desc_rings(struct "SKB addresses:\nskb\t\tskb data\tdma data\n"); for (queue = 0; queue < rx_count; queue++) { @@ -397,7 +397,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_init_rx_buffers; } -@@ -1751,12 +1784,12 @@ static int init_dma_rx_desc_rings(struct +@@ -1752,12 +1785,12 @@ static int init_dma_rx_desc_rings(struct err_init_rx_buffers: while (queue >= 0) { @@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski rx_q->buf_alloc_num = 0; rx_q->xsk_pool = NULL; -@@ -1773,14 +1806,17 @@ err_init_rx_buffers: +@@ -1774,14 +1807,17 @@ err_init_rx_buffers: /** * __init_dma_tx_desc_rings - init the TX descriptor ring (per queue) * @priv: driver private structure @@ -434,7 +434,7 @@ Signed-off-by: Jakub Kicinski int i; netif_dbg(priv, probe, priv->dev, -@@ -1792,16 +1828,16 @@ static int __init_dma_tx_desc_rings(stru +@@ -1793,16 +1829,16 @@ static int __init_dma_tx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, tx_q->dma_etx, tx_q->dma_tx_phy, @@ -454,7 +454,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1823,7 +1859,8 @@ static int __init_dma_tx_desc_rings(stru +@@ -1824,7 +1860,8 @@ static int __init_dma_tx_desc_rings(stru return 0; } @@ -464,7 +464,7 @@ Signed-off-by: Jakub Kicinski { struct stmmac_priv *priv = netdev_priv(dev); u32 tx_queue_cnt; -@@ -1832,7 +1869,7 @@ static int init_dma_tx_desc_rings(struct +@@ -1833,7 +1870,7 @@ static int init_dma_tx_desc_rings(struct tx_queue_cnt = priv->plat->tx_queues_to_use; for (queue = 0; queue < tx_queue_cnt; queue++) @@ -473,7 +473,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -1840,26 +1877,29 @@ static int init_dma_tx_desc_rings(struct +@@ -1841,26 +1878,29 @@ static int init_dma_tx_desc_rings(struct /** * init_dma_desc_rings - init the RX/TX descriptor rings * @dev: net device structure @@ -508,7 +508,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -1867,17 +1907,20 @@ static int init_dma_desc_rings(struct ne +@@ -1868,17 +1908,20 @@ static int init_dma_desc_rings(struct ne /** * dma_free_tx_skbufs - free TX dma buffers * @priv: private structure @@ -533,7 +533,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->xsk_pool && tx_q->xsk_frames_done) { xsk_tx_completed(tx_q->xsk_pool, tx_q->xsk_frames_done); -@@ -1896,34 +1939,37 @@ static void stmmac_free_tx_skbufs(struct +@@ -1897,34 +1940,37 @@ static void stmmac_free_tx_skbufs(struct u32 queue; for (queue = 0; queue < tx_queue_cnt; queue++) @@ -578,7 +578,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), rx_q->dma_erx, rx_q->dma_rx_phy); -@@ -1935,29 +1981,33 @@ static void __free_dma_rx_desc_resources +@@ -1936,29 +1982,33 @@ static void __free_dma_rx_desc_resources page_pool_destroy(rx_q->page_pool); } @@ -617,7 +617,7 @@ Signed-off-by: Jakub Kicinski if (priv->extend_desc) { size = sizeof(struct dma_extended_desc); -@@ -1970,7 +2020,7 @@ static void __free_dma_tx_desc_resources +@@ -1971,7 +2021,7 @@ static void __free_dma_tx_desc_resources addr = tx_q->dma_tx; } @@ -626,7 +626,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy); -@@ -1978,28 +2028,32 @@ static void __free_dma_tx_desc_resources +@@ -1979,28 +2029,32 @@ static void __free_dma_tx_desc_resources kfree(tx_q->tx_skbuff); } @@ -663,7 +663,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; bool xdp_prog = stmmac_xdp_is_enabled(priv); struct page_pool_params pp_params = { 0 }; -@@ -2011,8 +2065,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2012,8 +2066,8 @@ static int __alloc_dma_rx_desc_resources rx_q->priv_data = priv; pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV; @@ -674,7 +674,7 @@ Signed-off-by: Jakub Kicinski pp_params.order = ilog2(num_pages); pp_params.nid = dev_to_node(priv->device); pp_params.dev = priv->device; -@@ -2027,7 +2081,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2028,7 +2082,7 @@ static int __alloc_dma_rx_desc_resources return ret; } @@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski sizeof(*rx_q->buf_pool), GFP_KERNEL); if (!rx_q->buf_pool) -@@ -2035,7 +2089,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2036,7 +2090,7 @@ static int __alloc_dma_rx_desc_resources if (priv->extend_desc) { rx_q->dma_erx = dma_alloc_coherent(priv->device, @@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2044,7 +2098,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2045,7 +2099,7 @@ static int __alloc_dma_rx_desc_resources } else { rx_q->dma_rx = dma_alloc_coherent(priv->device, @@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2069,7 +2123,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2070,7 +2124,8 @@ static int __alloc_dma_rx_desc_resources return 0; } @@ -711,7 +711,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_count = priv->plat->rx_queues_to_use; u32 queue; -@@ -2077,7 +2132,7 @@ static int alloc_dma_rx_desc_resources(s +@@ -2078,7 +2133,7 @@ static int alloc_dma_rx_desc_resources(s /* RX queues buffers and DMA */ for (queue = 0; queue < rx_count; queue++) { @@ -720,7 +720,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_dma; } -@@ -2085,7 +2140,7 @@ static int alloc_dma_rx_desc_resources(s +@@ -2086,7 +2141,7 @@ static int alloc_dma_rx_desc_resources(s return 0; err_dma: @@ -729,7 +729,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -2093,28 +2148,31 @@ err_dma: +@@ -2094,28 +2149,31 @@ err_dma: /** * __alloc_dma_tx_desc_resources - alloc TX resources (per queue). * @priv: private structure @@ -765,7 +765,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct sk_buff *), GFP_KERNEL); if (!tx_q->tx_skbuff) -@@ -2127,7 +2185,7 @@ static int __alloc_dma_tx_desc_resources +@@ -2128,7 +2186,7 @@ static int __alloc_dma_tx_desc_resources else size = sizeof(struct dma_desc); @@ -774,7 +774,7 @@ Signed-off-by: Jakub Kicinski addr = dma_alloc_coherent(priv->device, size, &tx_q->dma_tx_phy, GFP_KERNEL); -@@ -2144,7 +2202,8 @@ static int __alloc_dma_tx_desc_resources +@@ -2145,7 +2203,8 @@ static int __alloc_dma_tx_desc_resources return 0; } @@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski { u32 tx_count = priv->plat->tx_queues_to_use; u32 queue; -@@ -2152,7 +2211,7 @@ static int alloc_dma_tx_desc_resources(s +@@ -2153,7 +2212,7 @@ static int alloc_dma_tx_desc_resources(s /* TX queues buffers and DMA */ for (queue = 0; queue < tx_count; queue++) { @@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_dma; } -@@ -2160,27 +2219,29 @@ static int alloc_dma_tx_desc_resources(s +@@ -2161,27 +2220,29 @@ static int alloc_dma_tx_desc_resources(s return 0; err_dma: @@ -827,7 +827,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -2188,16 +2249,18 @@ static int alloc_dma_desc_resources(stru +@@ -2189,16 +2250,18 @@ static int alloc_dma_desc_resources(stru /** * free_dma_desc_resources - free dma desc resources * @priv: private structure @@ -849,7 +849,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -2686,8 +2749,8 @@ static void stmmac_tx_err(struct stmmac_ +@@ -2687,8 +2750,8 @@ static void stmmac_tx_err(struct stmmac_ netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan)); stmmac_stop_tx_dma(priv, chan); @@ -860,7 +860,7 @@ Signed-off-by: Jakub Kicinski stmmac_reset_tx_queue(priv, chan); stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -3684,19 +3747,93 @@ static int stmmac_request_irq(struct net +@@ -3685,19 +3748,93 @@ static int stmmac_request_irq(struct net } /** @@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski u32 chan; int ret; -@@ -3723,45 +3860,10 @@ static int stmmac_open(struct net_device +@@ -3724,45 +3861,10 @@ static int stmmac_open(struct net_device memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); priv->xstats.threshold = tc; @@ -1005,7 +1005,7 @@ Signed-off-by: Jakub Kicinski if (priv->plat->serdes_powerup) { ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv); -@@ -3804,14 +3906,28 @@ irq_error: +@@ -3805,14 +3907,28 @@ irq_error: stmmac_hw_teardown(dev); init_error: @@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski static void stmmac_fpe_stop_wq(struct stmmac_priv *priv) { set_bit(__FPE_REMOVING, &priv->fpe_task_state); -@@ -3858,7 +3974,7 @@ static int stmmac_release(struct net_dev +@@ -3859,7 +3975,7 @@ static int stmmac_release(struct net_dev stmmac_stop_all_dma(priv); /* Release and free the Rx/Tx resources */ @@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski /* Disable the MAC Rx/Tx */ stmmac_mac_set(priv, priv->ioaddr, false); -@@ -6403,7 +6519,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6405,7 +6521,7 @@ void stmmac_disable_rx_queue(struct stmm spin_unlock_irqrestore(&ch->lock, flags); stmmac_stop_rx_dma(priv, queue); @@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski } void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue) -@@ -6414,21 +6530,21 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6416,21 +6532,21 @@ void stmmac_enable_rx_queue(struct stmma u32 buf_size; int ret; @@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, rx_q->queue_index); -@@ -6466,7 +6582,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6468,7 +6584,7 @@ void stmmac_disable_tx_queue(struct stmm spin_unlock_irqrestore(&ch->lock, flags); stmmac_stop_tx_dma(priv, queue); @@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski } void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue) -@@ -6476,21 +6592,21 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6478,21 +6594,21 @@ void stmmac_enable_tx_queue(struct stmma unsigned long flags; int ret; @@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, tx_q->queue_index); -@@ -6530,7 +6646,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6532,7 +6648,7 @@ void stmmac_xdp_release(struct net_devic stmmac_stop_all_dma(priv); /* Release and free the Rx/Tx resources */ @@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski /* Disable the MAC Rx/Tx */ stmmac_mac_set(priv, priv->ioaddr, false); -@@ -6555,14 +6671,14 @@ int stmmac_xdp_open(struct net_device *d +@@ -6557,14 +6673,14 @@ int stmmac_xdp_open(struct net_device *d u32 chan; int ret; @@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski if (ret < 0) { netdev_err(dev, "%s: DMA descriptors initialization failed\n", __func__); -@@ -6644,7 +6760,7 @@ irq_error: +@@ -6646,7 +6762,7 @@ irq_error: stmmac_hw_teardown(dev); init_error: @@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski dma_desc_error: return ret; } -@@ -7503,7 +7619,7 @@ int stmmac_resume(struct device *dev) +@@ -7509,7 +7625,7 @@ int stmmac_resume(struct device *dev) stmmac_reset_queues_param(priv); stmmac_free_tx_skbufs(priv); diff --git a/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch b/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch index 8fccc71659..e1d46f03a9 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -5626,18 +5626,15 @@ static int stmmac_change_mtu(struct net_ +@@ -5627,18 +5627,15 @@ static int stmmac_change_mtu(struct net_ { struct stmmac_priv *priv = netdev_priv(dev); int txfifosz = priv->plat->tx_fifo_size; @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) { netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n"); return -EINVAL; -@@ -5649,8 +5646,29 @@ static int stmmac_change_mtu(struct net_ +@@ -5650,8 +5647,29 @@ static int stmmac_change_mtu(struct net_ if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB)) return -EINVAL; diff --git a/target/linux/generic/backport-5.15/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch b/target/linux/generic/backport-5.15/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch index 38ddcb5714..9fbc31f473 100644 --- a/target/linux/generic/backport-5.15/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch +++ b/target/linux/generic/backport-5.15/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch @@ -87,7 +87,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -9625,6 +9625,9 @@ static int rtl8152_probe(struct usb_inte +@@ -9639,6 +9639,9 @@ static int rtl8152_probe(struct usb_inte if (version == RTL_VER_UNKNOWN) return -ENODEV; @@ -97,7 +97,7 @@ Signed-off-by: David S. Miller if (!rtl_vendor_mode(intf)) return -ENODEV; -@@ -9834,43 +9837,35 @@ static void rtl8152_disconnect(struct us +@@ -9848,43 +9851,35 @@ static void rtl8152_disconnect(struct us } } @@ -164,7 +164,7 @@ Signed-off-by: David S. Miller {} }; -@@ -9890,7 +9885,61 @@ static struct usb_driver rtl8152_driver +@@ -9904,7 +9899,61 @@ static struct usb_driver rtl8152_driver .disable_hub_initiated_lpm = 1, }; diff --git a/target/linux/generic/backport-5.15/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch b/target/linux/generic/backport-5.15/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch index 8bbf0be802..7e55eedbd8 100644 --- a/target/linux/generic/backport-5.15/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch +++ b/target/linux/generic/backport-5.15/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -9531,9 +9531,8 @@ static int rtl_fw_init(struct r8152 *tp) +@@ -9545,9 +9545,8 @@ static int rtl_fw_init(struct r8152 *tp) return 0; } @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller u32 ocp_data = 0; __le32 *tmp; u8 version; -@@ -9603,10 +9602,19 @@ u8 rtl8152_get_version(struct usb_interf +@@ -9617,10 +9616,19 @@ u8 rtl8152_get_version(struct usb_interf break; default: version = RTL_VER_UNKNOWN; @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller dev_dbg(&intf->dev, "Detected version 0x%04x\n", version); return version; -@@ -9890,6 +9898,12 @@ static int rtl8152_cfgselector_probe(str +@@ -9904,6 +9912,12 @@ static int rtl8152_cfgselector_probe(str struct usb_host_config *c; int i, num_configs; diff --git a/target/linux/generic/backport-5.15/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch b/target/linux/generic/backport-5.15/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch index c9bd0df202..d9a7116630 100644 --- a/target/linux/generic/backport-5.15/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch +++ b/target/linux/generic/backport-5.15/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -8267,43 +8267,6 @@ static bool rtl_check_vendor_ok(struct u +@@ -8281,43 +8281,6 @@ static bool rtl_check_vendor_ok(struct u return true; } @@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski static int rtl8152_pre_reset(struct usb_interface *intf) { struct r8152 *tp = usb_get_intfdata(intf); -@@ -9636,7 +9599,7 @@ static int rtl8152_probe(struct usb_inte +@@ -9650,7 +9613,7 @@ static int rtl8152_probe(struct usb_inte if (intf->cur_altsetting->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC) return -ENODEV; diff --git a/target/linux/generic/backport-5.15/795-v6.3-05-r8152-reduce-the-control-transfer-of-rtl8152_get_ver.patch b/target/linux/generic/backport-5.15/795-v6.3-05-r8152-reduce-the-control-transfer-of-rtl8152_get_ver.patch index 7d1053aea5..482c6c6f13 100644 --- a/target/linux/generic/backport-5.15/795-v6.3-05-r8152-reduce-the-control-transfer-of-rtl8152_get_ver.patch +++ b/target/linux/generic/backport-5.15/795-v6.3-05-r8152-reduce-the-control-transfer-of-rtl8152_get_ver.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -9588,20 +9588,21 @@ static int rtl8152_probe(struct usb_inte +@@ -9602,20 +9602,21 @@ static int rtl8152_probe(struct usb_inte const struct usb_device_id *id) { struct usb_device *udev = interface_to_usbdev(intf); diff --git a/target/linux/generic/backport-5.15/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch b/target/linux/generic/backport-5.15/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch index df881e2608..d275f6a126 100644 --- a/target/linux/generic/backport-5.15/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch +++ b/target/linux/generic/backport-5.15/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch @@ -14,7 +14,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -9898,6 +9898,7 @@ static struct usb_device_driver rtl8152_ +@@ -9912,6 +9912,7 @@ static struct usb_device_driver rtl8152_ .probe = rtl8152_cfgselector_probe, .id_table = rtl8152_table, .generic_subclass = 1, diff --git a/target/linux/generic/backport-5.15/795-v6.6-09-r8152-set-bp-in-bulk.patch b/target/linux/generic/backport-5.15/795-v6.6-09-r8152-set-bp-in-bulk.patch index cfc31daf12..6c7efd7f2b 100644 --- a/target/linux/generic/backport-5.15/795-v6.6-09-r8152-set-bp-in-bulk.patch +++ b/target/linux/generic/backport-5.15/795-v6.6-09-r8152-set-bp-in-bulk.patch @@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -3977,29 +3977,10 @@ static void rtl_reset_bmu(struct r8152 * +@@ -3983,29 +3983,10 @@ static void rtl_reset_bmu(struct r8152 * /* Clear the bp to stop the firmware before loading a new one */ static void rtl_clear_bp(struct r8152 *tp, u16 type) { @@ -48,7 +48,7 @@ Signed-off-by: Jakub Kicinski case RTL_VER_08: case RTL_VER_09: case RTL_VER_10: -@@ -4007,32 +3988,31 @@ static void rtl_clear_bp(struct r8152 *t +@@ -4013,32 +3994,31 @@ static void rtl_clear_bp(struct r8152 *t case RTL_VER_12: case RTL_VER_13: case RTL_VER_15: @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski /* wait 3 ms to make sure the firmware is stopped */ usleep_range(3000, 6000); -@@ -5009,10 +4989,9 @@ static void rtl8152_fw_phy_nc_apply(stru +@@ -5015,10 +4995,9 @@ static void rtl8152_fw_phy_nc_apply(stru static void rtl8152_fw_mac_apply(struct r8152 *tp, struct fw_mac *mac) { @@ -112,7 +112,7 @@ Signed-off-by: Jakub Kicinski switch (__le32_to_cpu(mac->blk_hdr.type)) { case RTL_FW_PLA: -@@ -5054,12 +5033,8 @@ static void rtl8152_fw_mac_apply(struct +@@ -5060,12 +5039,8 @@ static void rtl8152_fw_mac_apply(struct ocp_write_word(tp, type, __le16_to_cpu(mac->bp_ba_addr), __le16_to_cpu(mac->bp_ba_value)); diff --git a/target/linux/generic/backport-5.15/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch b/target/linux/generic/backport-5.15/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch index 4d1b177ff2..0077893313 100644 --- a/target/linux/generic/backport-5.15/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch +++ b/target/linux/generic/backport-5.15/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski extern u8 rtl8152_get_version(struct usb_interface *intf); --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -9820,6 +9820,7 @@ static const struct usb_device_id rtl815 +@@ -9834,6 +9834,7 @@ static const struct usb_device_id rtl815 { USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) }, { USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) }, { USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) }, diff --git a/target/linux/generic/backport-5.15/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch b/target/linux/generic/backport-5.15/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch deleted file mode 100644 index 4f0e0e1c65..0000000000 --- a/target/linux/generic/backport-5.15/795-v6.6-12-r8152-Rename-RTL8152_UNPLUG-to-RTL8152_INACCESSIBLE.patch +++ /dev/null @@ -1,447 +0,0 @@ -From 715f67f33af45ce2cc3a5b1ef133cc8c8e7787b0 Mon Sep 17 00:00:00 2001 -From: Douglas Anderson -Date: Fri, 20 Oct 2023 14:06:58 -0700 -Subject: [PATCH] r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE - -Whenever the RTL8152_UNPLUG is set that just tells the driver that all -accesses will fail and we should just immediately bail. A future patch -will use this same concept at a time when the driver hasn't actually -been unplugged but is about to be reset. Rename the flag in -preparation for the future patch. - -This is a no-op change and just a search and replace. - -Signed-off-by: Douglas Anderson -Reviewed-by: Grant Grundler -Signed-off-by: David S. Miller ---- - drivers/net/usb/r8152.c | 96 ++++++++++++++++++++--------------------- - 1 file changed, 48 insertions(+), 48 deletions(-) - ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -763,7 +763,7 @@ enum rtl_register_content { - - /* rtl8152 flags */ - enum rtl8152_flags { -- RTL8152_UNPLUG = 0, -+ RTL8152_INACCESSIBLE = 0, - RTL8152_SET_RX_MODE, - WORK_ENABLE, - RTL8152_LINK_CHG, -@@ -1241,7 +1241,7 @@ int set_registers(struct r8152 *tp, u16 - static void rtl_set_unplug(struct r8152 *tp) - { - if (tp->udev->state == USB_STATE_NOTATTACHED) { -- set_bit(RTL8152_UNPLUG, &tp->flags); -+ set_bit(RTL8152_INACCESSIBLE, &tp->flags); - smp_mb__after_atomic(); - } - } -@@ -1252,7 +1252,7 @@ static int generic_ocp_read(struct r8152 - u16 limit = 64; - int ret = 0; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - /* both size and indix must be 4 bytes align */ -@@ -1296,7 +1296,7 @@ static int generic_ocp_write(struct r815 - u16 byteen_start, byteen_end, byen; - u16 limit = 512; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - /* both size and indix must be 4 bytes align */ -@@ -1533,7 +1533,7 @@ static int read_mii_word(struct net_devi - struct r8152 *tp = netdev_priv(netdev); - int ret; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - if (phy_id != R8152_PHY_ID) -@@ -1549,7 +1549,7 @@ void write_mii_word(struct net_device *n - { - struct r8152 *tp = netdev_priv(netdev); - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - if (phy_id != R8152_PHY_ID) -@@ -1754,7 +1754,7 @@ static void read_bulk_callback(struct ur - if (!tp) - return; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - if (!test_bit(WORK_ENABLE, &tp->flags)) -@@ -1846,7 +1846,7 @@ static void write_bulk_callback(struct u - if (!test_bit(WORK_ENABLE, &tp->flags)) - return; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - if (!skb_queue_empty(&tp->tx_queue)) -@@ -1867,7 +1867,7 @@ static void intr_callback(struct urb *ur - if (!test_bit(WORK_ENABLE, &tp->flags)) - return; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - switch (status) { -@@ -2611,7 +2611,7 @@ static void bottom_half(struct tasklet_s - { - struct r8152 *tp = from_tasklet(tp, t, tx_tl); - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - if (!test_bit(WORK_ENABLE, &tp->flags)) -@@ -2654,7 +2654,7 @@ int r8152_submit_rx(struct r8152 *tp, st - int ret; - - /* The rx would be stopped, so skip submitting */ -- if (test_bit(RTL8152_UNPLUG, &tp->flags) || -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags) || - !test_bit(WORK_ENABLE, &tp->flags) || !netif_carrier_ok(tp->netdev)) - return 0; - -@@ -3050,7 +3050,7 @@ static int rtl_enable(struct r8152 *tp) - - static int rtl8152_enable(struct r8152 *tp) - { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - set_tx_qlen(tp); -@@ -3137,7 +3137,7 @@ static int rtl8153_enable(struct r8152 * - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - set_tx_qlen(tp); -@@ -3169,7 +3169,7 @@ static void rtl_disable(struct r8152 *tp - u32 ocp_data; - int i; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) { -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) { - rtl_drop_queued_tx(tp); - return; - } -@@ -3623,7 +3623,7 @@ static u16 r8153_phy_status(struct r8152 - } - - msleep(20); -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - break; - } - -@@ -3655,7 +3655,7 @@ static void r8153b_ups_en(struct r8152 * - int i; - - for (i = 0; i < 500; i++) { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & - AUTOLOAD_DONE) -@@ -3697,7 +3697,7 @@ static void r8153c_ups_en(struct r8152 * - int i; - - for (i = 0; i < 500; i++) { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & - AUTOLOAD_DONE) -@@ -4042,8 +4042,8 @@ static int rtl_phy_patch_request(struct - for (i = 0; wait && i < 5000; i++) { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -- break; -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) -+ return -ENODEV; - - usleep_range(1000, 2000); - ocp_data = ocp_reg_read(tp, OCP_PHY_PATCH_STAT); -@@ -6001,7 +6001,7 @@ static int rtl8156_enable(struct r8152 * - u32 ocp_data; - u16 speed; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - r8156_fc_parameter(tp); -@@ -6059,7 +6059,7 @@ static int rtl8156b_enable(struct r8152 - u32 ocp_data; - u16 speed; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - set_tx_qlen(tp); -@@ -6245,7 +6245,7 @@ out: - - static void rtl8152_up(struct r8152 *tp) - { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8152_aldps_en(tp, false); -@@ -6255,7 +6255,7 @@ static void rtl8152_up(struct r8152 *tp) - - static void rtl8152_down(struct r8152 *tp) - { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) { -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) { - rtl_drop_queued_tx(tp); - return; - } -@@ -6270,7 +6270,7 @@ static void rtl8153_up(struct r8152 *tp) - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153_u1u2en(tp, false); -@@ -6310,7 +6310,7 @@ static void rtl8153_down(struct r8152 *t - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) { -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) { - rtl_drop_queued_tx(tp); - return; - } -@@ -6331,7 +6331,7 @@ static void rtl8153b_up(struct r8152 *tp - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153b_u1u2en(tp, false); -@@ -6355,7 +6355,7 @@ static void rtl8153b_down(struct r8152 * - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) { -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) { - rtl_drop_queued_tx(tp); - return; - } -@@ -6392,7 +6392,7 @@ static void rtl8153c_up(struct r8152 *tp - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153b_u1u2en(tp, false); -@@ -6473,7 +6473,7 @@ static void rtl8156_up(struct r8152 *tp) - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153b_u1u2en(tp, false); -@@ -6546,7 +6546,7 @@ static void rtl8156_down(struct r8152 *t - { - u32 ocp_data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) { -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) { - rtl_drop_queued_tx(tp); - return; - } -@@ -6684,7 +6684,7 @@ static void rtl_work_func_t(struct work_ - /* If the device is unplugged or !netif_running(), the workqueue - * doesn't need to wake the device, and could return directly. - */ -- if (test_bit(RTL8152_UNPLUG, &tp->flags) || !netif_running(tp->netdev)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags) || !netif_running(tp->netdev)) - return; - - if (usb_autopm_get_interface(tp->intf) < 0) -@@ -6723,7 +6723,7 @@ static void rtl_hw_phy_work_func_t(struc - { - struct r8152 *tp = container_of(work, struct r8152, hw_phy_work.work); - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - if (usb_autopm_get_interface(tp->intf) < 0) -@@ -6850,7 +6850,7 @@ static int rtl8152_close(struct net_devi - netif_stop_queue(netdev); - - res = usb_autopm_get_interface(tp->intf); -- if (res < 0 || test_bit(RTL8152_UNPLUG, &tp->flags)) { -+ if (res < 0 || test_bit(RTL8152_INACCESSIBLE, &tp->flags)) { - rtl_drop_queued_tx(tp); - rtl_stop_rx(tp); - } else { -@@ -6883,7 +6883,7 @@ static void r8152b_init(struct r8152 *tp - u32 ocp_data; - u16 data; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - data = r8152_mdio_read(tp, MII_BMCR); -@@ -6927,7 +6927,7 @@ static void r8153_init(struct r8152 *tp) - u16 data; - int i; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153_u1u2en(tp, false); -@@ -6938,7 +6938,7 @@ static void r8153_init(struct r8152 *tp) - break; - - msleep(20); -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - break; - } - -@@ -7067,7 +7067,7 @@ static void r8153b_init(struct r8152 *tp - u16 data; - int i; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153b_u1u2en(tp, false); -@@ -7078,7 +7078,7 @@ static void r8153b_init(struct r8152 *tp - break; - - msleep(20); -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - break; - } - -@@ -7149,7 +7149,7 @@ static void r8153c_init(struct r8152 *tp - u16 data; - int i; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153b_u1u2en(tp, false); -@@ -7169,7 +7169,7 @@ static void r8153c_init(struct r8152 *tp - break; - - msleep(20); -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - } - -@@ -7998,7 +7998,7 @@ static void r8156_init(struct r8152 *tp) - u16 data; - int i; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_ECM_OP); -@@ -8019,7 +8019,7 @@ static void r8156_init(struct r8152 *tp) - break; - - msleep(20); -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - } - -@@ -8094,7 +8094,7 @@ static void r8156b_init(struct r8152 *tp - u16 data; - int i; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_ECM_OP); -@@ -8128,7 +8128,7 @@ static void r8156b_init(struct r8152 *tp - break; - - msleep(20); -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - } - -@@ -9153,7 +9153,7 @@ static int rtl8152_ioctl(struct net_devi - struct mii_ioctl_data *data = if_mii(rq); - int res; - -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return -ENODEV; - - res = usb_autopm_get_interface(tp->intf); -@@ -9255,7 +9255,7 @@ static const struct net_device_ops rtl81 - - static void rtl8152_unload(struct r8152 *tp) - { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - if (tp->version != RTL_VER_01) -@@ -9264,7 +9264,7 @@ static void rtl8152_unload(struct r8152 - - static void rtl8153_unload(struct r8152 *tp) - { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153_power_cut_en(tp, false); -@@ -9272,7 +9272,7 @@ static void rtl8153_unload(struct r8152 - - static void rtl8153b_unload(struct r8152 *tp) - { -- if (test_bit(RTL8152_UNPLUG, &tp->flags)) -+ if (test_bit(RTL8152_INACCESSIBLE, &tp->flags)) - return; - - r8153b_power_cut_en(tp, false); diff --git a/target/linux/generic/backport-5.15/795-v6.6-13-r8152-Block-future-register-access-if-register-acces.patch b/target/linux/generic/backport-5.15/795-v6.6-13-r8152-Block-future-register-access-if-register-acces.patch index 0ce8206657..3ef8f37911 100644 --- a/target/linux/generic/backport-5.15/795-v6.6-13-r8152-Block-future-register-access-if-register-acces.patch +++ b/target/linux/generic/backport-5.15/795-v6.6-13-r8152-Block-future-register-access-if-register-acces.patch @@ -232,7 +232,7 @@ Signed-off-by: David S. Miller } static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size, -@@ -8254,7 +8348,7 @@ static int rtl8152_pre_reset(struct usb_ +@@ -8268,7 +8362,7 @@ static int rtl8152_pre_reset(struct usb_ struct r8152 *tp = usb_get_intfdata(intf); struct net_device *netdev; @@ -241,7 +241,7 @@ Signed-off-by: David S. Miller return 0; netdev = tp->netdev; -@@ -8269,7 +8363,9 @@ static int rtl8152_pre_reset(struct usb_ +@@ -8283,7 +8377,9 @@ static int rtl8152_pre_reset(struct usb_ napi_disable(&tp->napi); if (netif_carrier_ok(netdev)) { mutex_lock(&tp->control); @@ -251,7 +251,7 @@ Signed-off-by: David S. Miller mutex_unlock(&tp->control); } -@@ -8282,9 +8378,11 @@ static int rtl8152_post_reset(struct usb +@@ -8296,9 +8392,11 @@ static int rtl8152_post_reset(struct usb struct net_device *netdev; struct sockaddr sa; @@ -264,7 +264,7 @@ Signed-off-by: David S. Miller /* reset the MAC address in case of policy change */ if (determine_ethernet_addr(tp, &sa) >= 0) { rtnl_lock(); -@@ -9482,17 +9580,29 @@ static u8 __rtl_get_hw_ver(struct usb_de +@@ -9496,17 +9594,29 @@ static u8 __rtl_get_hw_ver(struct usb_de __le32 *tmp; u8 version; int ret; @@ -300,7 +300,7 @@ Signed-off-by: David S. Miller kfree(tmp); -@@ -9566,25 +9676,14 @@ u8 rtl8152_get_version(struct usb_interf +@@ -9580,25 +9690,14 @@ u8 rtl8152_get_version(struct usb_interf } EXPORT_SYMBOL_GPL(rtl8152_get_version); @@ -328,7 +328,7 @@ Signed-off-by: David S. Miller usb_reset_device(udev); netdev = alloc_etherdev(sizeof(struct r8152)); if (!netdev) { -@@ -9757,10 +9856,20 @@ static int rtl8152_probe(struct usb_inte +@@ -9771,10 +9870,20 @@ static int rtl8152_probe(struct usb_inte else device_set_wakeup_enable(&udev->dev, false); @@ -349,7 +349,7 @@ Signed-off-by: David S. Miller out1: tasklet_kill(&tp->tx_tl); cancel_delayed_work_sync(&tp->hw_phy_work); -@@ -9769,10 +9878,46 @@ out1: +@@ -9783,10 +9892,46 @@ out1: rtl8152_release_firmware(tp); usb_set_intfdata(intf, NULL); out: diff --git a/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch b/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch index 26c5af8510..5c5bd99b45 100644 --- a/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch +++ b/target/linux/generic/hack-5.15/760-net-usb-r8152-add-LED-configuration-from-OF.patch @@ -22,7 +22,7 @@ Signed-off-by: David Bauer #include #include #include -@@ -6980,6 +6981,22 @@ static void rtl_tally_reset(struct r8152 +@@ -6994,6 +6995,22 @@ static void rtl_tally_reset(struct r8152 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); } @@ -45,7 +45,7 @@ Signed-off-by: David Bauer static void r8152b_init(struct r8152 *tp) { u32 ocp_data; -@@ -7021,6 +7038,8 @@ static void r8152b_init(struct r8152 *tp +@@ -7035,6 +7052,8 @@ static void r8152b_init(struct r8152 *tp ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); @@ -54,7 +54,7 @@ Signed-off-by: David Bauer } static void r8153_init(struct r8152 *tp) -@@ -7161,6 +7180,8 @@ static void r8153_init(struct r8152 *tp) +@@ -7175,6 +7194,8 @@ static void r8153_init(struct r8152 *tp) tp->coalesce = COALESCE_SLOW; break; } @@ -63,7 +63,7 @@ Signed-off-by: David Bauer } static void r8153b_init(struct r8152 *tp) -@@ -7243,6 +7264,8 @@ static void r8153b_init(struct r8152 *tp +@@ -7257,6 +7278,8 @@ static void r8153b_init(struct r8152 *tp rtl_tally_reset(tp); tp->coalesce = 15000; /* 15 us */ diff --git a/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch b/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch index f27b7ef9de..258a5fb33c 100644 --- a/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch +++ b/target/linux/generic/hack-5.15/800-GPIO-add-named-gpio-exports.patch @@ -157,7 +157,7 @@ Signed-off-by: John Crispin { --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c -@@ -561,7 +561,7 @@ static struct class gpio_class = { +@@ -564,7 +564,7 @@ static struct class gpio_class = { * * Returns zero on success, else an error. */ @@ -166,7 +166,7 @@ Signed-off-by: John Crispin { struct gpio_chip *chip; struct gpio_device *gdev; -@@ -623,6 +623,8 @@ int gpiod_export(struct gpio_desc *desc, +@@ -626,6 +626,8 @@ int gpiod_export(struct gpio_desc *desc, offset = gpio_chip_hwgpio(desc); if (chip->names && chip->names[offset]) ioname = chip->names[offset]; @@ -175,7 +175,7 @@ Signed-off-by: John Crispin dev = device_create_with_groups(&gpio_class, &gdev->dev, MKDEV(0, 0), data, gpio_groups, -@@ -644,6 +646,12 @@ err_unlock: +@@ -647,6 +649,12 @@ err_unlock: gpiod_dbg(desc, "%s: status %d\n", __func__, status); return status; } diff --git a/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch b/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch index 0fcd415966..be4dacf094 100644 --- a/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch +++ b/target/linux/generic/pending-5.15/300-mips_expose_boot_raw.patch @@ -9,7 +9,7 @@ Acked-by: Rob Landley --- --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1102,9 +1102,6 @@ config FW_ARC +@@ -1103,9 +1103,6 @@ config FW_ARC config ARCH_MAY_HAVE_PC_FDC bool @@ -19,7 +19,7 @@ Acked-by: Rob Landley config CEVT_BCM1480 bool -@@ -3184,6 +3181,18 @@ choice +@@ -3186,6 +3183,18 @@ choice bool "Extend builtin kernel arguments with bootloader arguments" endchoice diff --git a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 8743d7f367..723af24770 100644 --- a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -7708,7 +7708,7 @@ static int nft_register_flowtable_net_ho +@@ -7709,7 +7709,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch index 25410e1fb7..e6a1361022 100644 --- a/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch +++ b/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch @@ -15,7 +15,7 @@ Signed-off-by: Stefan Koch --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -2431,6 +2431,12 @@ config MIPS_VPE_LOADER +@@ -2433,6 +2433,12 @@ config MIPS_VPE_LOADER Includes a loader for loading an elf relocatable object onto another VPE and running it. diff --git a/target/linux/mediatek/patches-5.15/100-dts-update-mt7622-rfb1.patch b/target/linux/mediatek/patches-5.15/100-dts-update-mt7622-rfb1.patch index 7224a9882c..1f9e24a4d2 100644 --- a/target/linux/mediatek/patches-5.15/100-dts-update-mt7622-rfb1.patch +++ b/target/linux/mediatek/patches-5.15/100-dts-update-mt7622-rfb1.patch @@ -40,7 +40,7 @@ }; }; - memory { + memory@40000000 { - reg = <0 0x40000000 0 0x20000000>; + reg = <0 0x40000000 0 0x40000000>; }; diff --git a/target/linux/mediatek/patches-5.15/113-dts-fix-bpi64-leds-and-buttons.patch b/target/linux/mediatek/patches-5.15/113-dts-fix-bpi64-leds-and-buttons.patch index f88dbc7195..f728b96564 100644 --- a/target/linux/mediatek/patches-5.15/113-dts-fix-bpi64-leds-and-buttons.patch +++ b/target/linux/mediatek/patches-5.15/113-dts-fix-bpi64-leds-and-buttons.patch @@ -53,4 +53,4 @@ + */ }; - memory { + memory@40000000 { diff --git a/target/linux/realtek/patches-5.15/300-mips-add-rtl838x-platform.patch b/target/linux/realtek/patches-5.15/300-mips-add-rtl838x-platform.patch index ed121a7ce7..eaeea0991d 100644 --- a/target/linux/realtek/patches-5.15/300-mips-add-rtl838x-platform.patch +++ b/target/linux/realtek/patches-5.15/300-mips-add-rtl838x-platform.patch @@ -25,7 +25,7 @@ Submitted-by: Birger Koblitz platform-$(CONFIG_SGI_IP28) += sgi-ip22/ --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -1055,8 +1055,58 @@ config NLM_XLP_BOARD +@@ -1056,8 +1056,58 @@ config NLM_XLP_BOARD This board is based on Netlogic XLP Processor. Say Y here if you have a XLP based board.