mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-17 21:03:30 +00:00
kernel: bump 5.15 to 5.15.69
This commit is contained in:
parent
978bfe37bd
commit
19c9fb9439
include
target/linux
generic/backport-5.15
765-v5.17-01-net-next-net-dsa-reorder-PHY-initialization-with-MTU-setup-in.patch765-v5.17-02-net-next-net-dsa-merge-rtnl_lock-sections-in-dsa_slave_create.patch765-v5.17-03-net-next-net-dsa-stop-updating-master-MTU-from-master.c.patch765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch766-v5.18-03-net-dsa-tag_qca-convert-to-FIELD-macro.patch766-v5.18-04-net-dsa-tag_qca-move-define-to-include-linux-dsa.patch766-v5.18-05-net-dsa-tag_qca-enable-promisc_on_master-flag.patch766-v5.18-06-net-dsa-tag_qca-add-define-for-handling-mgmt-Etherne.patch766-v5.18-07-net-dsa-tag_qca-add-define-for-handling-MIB-packet.patch766-v5.18-08-net-dsa-tag_qca-add-support-for-handling-mgmt-and-MI.patch766-v5.18-09-net-dsa-qca8k-add-tracking-state-of-master-port.patch766-v5.18-10-net-dsa-qca8k-add-support-for-mgmt-read-write-in-Eth.patch766-v5.18-11-net-dsa-qca8k-add-support-for-mib-autocast-in-Ethern.patch766-v5.18-12-net-dsa-qca8k-add-support-for-phy-read-write-with-mg.patch766-v5.18-13-net-dsa-qca8k-move-page-cache-to-driver-priv.patch766-v5.18-14-net-dsa-qca8k-cache-lo-and-hi-for-mdio-write.patch766-v5.18-15-net-dsa-qca8k-add-support-for-larger-read-write-size.patch766-v5.18-16-net-dsa-qca8k-introduce-qca8k_bulk_read-write-functi.patch775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch
x86
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .68
|
||||
LINUX_KERNEL_HASH-5.15.68 = 17bbb3cb5c9ba18583b6679cc28f828aec49c72abbfc6fbde310b0cb17218b7e
|
||||
LINUX_VERSION-5.15 = .69
|
||||
LINUX_KERNEL_HASH-5.15.69 = e32839ca761e5251f25708f7939b37b101d28fc29515a97bfc0c838a21efdf34
|
||||
|
@ -0,0 +1,142 @@
|
||||
From f9ec5723c3dbfcede9c7b0dcdf85e401ce16316c Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sat, 23 Jul 2022 16:29:29 +0200
|
||||
Subject: [PATCH 1/5] net: ethernet: stmicro: stmmac: move queue reset to
|
||||
dedicated functions
|
||||
|
||||
Move queue reset to dedicated functions. This aside from a simple
|
||||
cleanup is also required to allocate a dma conf without resetting the tx
|
||||
queue while the device is temporarily detached as now the reset is not
|
||||
part of the dma init function and can be done later in the code flow.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 59 ++++++++++---------
|
||||
1 file changed, 31 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -130,6 +130,9 @@ static irqreturn_t stmmac_mac_interrupt(
|
||||
static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id);
|
||||
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data);
|
||||
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data);
|
||||
+static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue);
|
||||
+static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue);
|
||||
+static void stmmac_reset_queues_param(struct stmmac_priv *priv);
|
||||
static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue);
|
||||
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue);
|
||||
|
||||
@@ -1697,9 +1700,6 @@ static int __init_dma_rx_desc_rings(stru
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- rx_q->cur_rx = 0;
|
||||
- rx_q->dirty_rx = 0;
|
||||
-
|
||||
/* Setup the chained descriptor addresses */
|
||||
if (priv->mode == STMMAC_CHAIN_MODE) {
|
||||
if (priv->extend_desc)
|
||||
@@ -1805,12 +1805,6 @@ static int __init_dma_tx_desc_rings(stru
|
||||
tx_q->tx_skbuff[i] = NULL;
|
||||
}
|
||||
|
||||
- tx_q->dirty_tx = 0;
|
||||
- tx_q->cur_tx = 0;
|
||||
- tx_q->mss = 0;
|
||||
-
|
||||
- netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, queue));
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2679,10 +2673,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);
|
||||
- tx_q->dirty_tx = 0;
|
||||
- tx_q->cur_tx = 0;
|
||||
- tx_q->mss = 0;
|
||||
- netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, chan));
|
||||
+ stmmac_reset_tx_queue(priv, chan);
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
tx_q->dma_tx_phy, chan);
|
||||
stmmac_start_tx_dma(priv, chan);
|
||||
@@ -3757,6 +3748,8 @@ static int stmmac_open(struct net_device
|
||||
goto init_error;
|
||||
}
|
||||
|
||||
+ stmmac_reset_queues_param(priv);
|
||||
+
|
||||
ret = stmmac_hw_setup(dev, true);
|
||||
if (ret < 0) {
|
||||
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
|
||||
@@ -6396,6 +6389,7 @@ void stmmac_enable_rx_queue(struct stmma
|
||||
return;
|
||||
}
|
||||
|
||||
+ stmmac_reset_rx_queue(priv, queue);
|
||||
stmmac_clear_rx_descriptors(priv, queue);
|
||||
|
||||
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
@@ -6457,6 +6451,7 @@ void stmmac_enable_tx_queue(struct stmma
|
||||
return;
|
||||
}
|
||||
|
||||
+ stmmac_reset_tx_queue(priv, queue);
|
||||
stmmac_clear_tx_descriptors(priv, queue);
|
||||
|
||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||
@@ -7384,6 +7379,25 @@ int stmmac_suspend(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||
|
||||
+static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
+{
|
||||
+ struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
|
||||
+
|
||||
+ rx_q->cur_rx = 0;
|
||||
+ rx_q->dirty_rx = 0;
|
||||
+}
|
||||
+
|
||||
+static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||
+{
|
||||
+ struct stmmac_tx_queue *tx_q = &priv->tx_queue[queue];
|
||||
+
|
||||
+ tx_q->cur_tx = 0;
|
||||
+ tx_q->dirty_tx = 0;
|
||||
+ tx_q->mss = 0;
|
||||
+
|
||||
+ netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, queue));
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* stmmac_reset_queues_param - reset queue parameters
|
||||
* @priv: device pointer
|
||||
@@ -7394,22 +7408,11 @@ static void stmmac_reset_queues_param(st
|
||||
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
||||
u32 queue;
|
||||
|
||||
- for (queue = 0; queue < rx_cnt; queue++) {
|
||||
- struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
|
||||
+ for (queue = 0; queue < rx_cnt; queue++)
|
||||
+ stmmac_reset_rx_queue(priv, queue);
|
||||
|
||||
- rx_q->cur_rx = 0;
|
||||
- rx_q->dirty_rx = 0;
|
||||
- }
|
||||
-
|
||||
- for (queue = 0; queue < tx_cnt; queue++) {
|
||||
- struct stmmac_tx_queue *tx_q = &priv->tx_queue[queue];
|
||||
-
|
||||
- tx_q->cur_tx = 0;
|
||||
- tx_q->dirty_tx = 0;
|
||||
- tx_q->mss = 0;
|
||||
-
|
||||
- netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, queue));
|
||||
- }
|
||||
+ for (queue = 0; queue < tx_cnt; queue++)
|
||||
+ stmmac_reset_tx_queue(priv, queue);
|
||||
}
|
||||
|
||||
/**
|
@ -0,0 +1,37 @@
|
||||
From 7028471edb646bfc532fec0973e50e784cdcb7c6 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sat, 23 Jul 2022 16:29:30 +0200
|
||||
Subject: [PATCH 2/5] net: ethernet: stmicro: stmmac: first disable all queues
|
||||
and disconnect in release
|
||||
|
||||
Disable all queues and disconnect before tx_disable in stmmac_release to
|
||||
prevent a corner case where packet may be still queued at the same time
|
||||
tx_disable is called resulting in kernel panic if some packet still has
|
||||
to be processed.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -3809,8 +3809,6 @@ static int stmmac_release(struct net_dev
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
u32 chan;
|
||||
|
||||
- netif_tx_disable(dev);
|
||||
-
|
||||
if (device_may_wakeup(priv->device))
|
||||
phylink_speed_down(priv->phylink, false);
|
||||
/* Stop and disconnect the PHY */
|
||||
@@ -3822,6 +3820,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);
|
||||
|
||||
+ netif_tx_disable(dev);
|
||||
+
|
||||
/* Free the IRQ lines */
|
||||
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,73 @@
|
||||
From 3470079687448abac42deb62774253be1d6bdef3 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sat, 23 Jul 2022 16:29:33 +0200
|
||||
Subject: [PATCH 5/5] net: ethernet: stmicro: stmmac: permit MTU change with
|
||||
interface up
|
||||
|
||||
Remove the limitation where the interface needs to be down to change
|
||||
MTU by releasing and opening the stmmac driver to set the new MTU.
|
||||
Also call the set_filter function to correctly init the port.
|
||||
This permits to remove the EBUSY error while the ethernet port is
|
||||
running permitting a correct MTU change if for example a DSA request
|
||||
a MTU change for a switch CPU port.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 30 +++++++++++++++----
|
||||
1 file changed, 24 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -5598,18 +5598,15 @@ static int stmmac_change_mtu(struct net_
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
int txfifosz = priv->plat->tx_fifo_size;
|
||||
+ struct stmmac_dma_conf *dma_conf;
|
||||
const int mtu = new_mtu;
|
||||
+ int ret;
|
||||
|
||||
if (txfifosz == 0)
|
||||
txfifosz = priv->dma_cap.tx_fifo_size;
|
||||
|
||||
txfifosz /= priv->plat->tx_queues_to_use;
|
||||
|
||||
- if (netif_running(dev)) {
|
||||
- netdev_err(priv->dev, "must be stopped to change its MTU\n");
|
||||
- return -EBUSY;
|
||||
- }
|
||||
-
|
||||
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
|
||||
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
|
||||
return -EINVAL;
|
||||
@@ -5621,8 +5618,29 @@ static int stmmac_change_mtu(struct net_
|
||||
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
||||
return -EINVAL;
|
||||
|
||||
- dev->mtu = mtu;
|
||||
+ if (netif_running(dev)) {
|
||||
+ netdev_dbg(priv->dev, "restarting interface to change its MTU\n");
|
||||
+ /* Try to allocate the new DMA conf with the new mtu */
|
||||
+ dma_conf = stmmac_setup_dma_desc(priv, mtu);
|
||||
+ if (IS_ERR(dma_conf)) {
|
||||
+ netdev_err(priv->dev, "failed allocating new dma conf for new MTU %d\n",
|
||||
+ mtu);
|
||||
+ return PTR_ERR(dma_conf);
|
||||
+ }
|
||||
+
|
||||
+ stmmac_release(dev);
|
||||
+
|
||||
+ ret = __stmmac_open(dev, dma_conf);
|
||||
+ kfree(dma_conf);
|
||||
+ if (ret) {
|
||||
+ netdev_err(priv->dev, "failed reopening the interface after MTU change\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ stmmac_set_rx_mode(dev);
|
||||
+ }
|
||||
|
||||
+ dev->mtu = mtu;
|
||||
netdev_update_features(dev);
|
||||
|
||||
return 0;
|
@ -10,7 +10,7 @@ BOARDNAME:=x86
|
||||
FEATURES:=squashfs vdi vmdk vhdx pcmcia fpu boot-part rootfs-part
|
||||
SUBTARGETS:=64 generic legacy geode
|
||||
|
||||
KERNEL_PATCHVER:=5.4
|
||||
KERNEL_PATCHVER:=5.15
|
||||
KERNEL_TESTING_PATCHVER:=5.19
|
||||
|
||||
KERNELNAME:=bzImage
|
||||
|
Loading…
Reference in New Issue
Block a user