diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-04-17 08:43:54 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-04-17 08:44:37 +0200 |
commit | 047695a0294fd7046ba45e5490156c2b8e936a81 (patch) | |
tree | de5072e74d685d2b4274b5bfce15d35230b73a05 /target/linux/mvebu/patches-4.4/050-net-mvneta-fix-changing-MTU-when-using-per-cpu-proce.patch | |
parent | aefa195749c68aa21bf135a5ec944b91cabc47ca (diff) | |
download | upstream-047695a0294fd7046ba45e5490156c2b8e936a81.tar.gz upstream-047695a0294fd7046ba45e5490156c2b8e936a81.tar.bz2 upstream-047695a0294fd7046ba45e5490156c2b8e936a81.zip |
Revert "mvebu: remove linux 4.4 support"
This reverts commit 51397d7d95d9f5e210a5557f65de1fa21e6f5921.
There are some unresolved random crashes on WRT1900AC v1 that still need
to be sorted out
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/mvebu/patches-4.4/050-net-mvneta-fix-changing-MTU-when-using-per-cpu-proce.patch')
-rw-r--r-- | target/linux/mvebu/patches-4.4/050-net-mvneta-fix-changing-MTU-when-using-per-cpu-proce.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-4.4/050-net-mvneta-fix-changing-MTU-when-using-per-cpu-proce.patch b/target/linux/mvebu/patches-4.4/050-net-mvneta-fix-changing-MTU-when-using-per-cpu-proce.patch new file mode 100644 index 0000000000..07862008a7 --- /dev/null +++ b/target/linux/mvebu/patches-4.4/050-net-mvneta-fix-changing-MTU-when-using-per-cpu-proce.patch @@ -0,0 +1,75 @@ +From: Marcin Wojtas <mw@semihalf.com> +Date: Fri, 1 Apr 2016 15:21:18 +0200 +Subject: [PATCH] net: mvneta: fix changing MTU when using per-cpu processing + +After enabling per-cpu processing it appeared that under heavy load +changing MTU can result in blocking all port's interrupts and +transmitting data is not possible after the change. + +This commit fixes above issue by disabling percpu interrupts for the +time, when TXQs and RXQs are reconfigured. + +Signed-off-by: Marcin Wojtas <mw@semihalf.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -3040,6 +3040,20 @@ static int mvneta_check_mtu_valid(struct + return mtu; + } + ++static void mvneta_percpu_enable(void *arg) ++{ ++ struct mvneta_port *pp = arg; ++ ++ enable_percpu_irq(pp->dev->irq, IRQ_TYPE_NONE); ++} ++ ++static void mvneta_percpu_disable(void *arg) ++{ ++ struct mvneta_port *pp = arg; ++ ++ disable_percpu_irq(pp->dev->irq); ++} ++ + /* Change the device mtu */ + static int mvneta_change_mtu(struct net_device *dev, int mtu) + { +@@ -3064,6 +3078,7 @@ static int mvneta_change_mtu(struct net_ + * reallocation of the queues + */ + mvneta_stop_dev(pp); ++ on_each_cpu(mvneta_percpu_disable, pp, true); + + mvneta_cleanup_txqs(pp); + mvneta_cleanup_rxqs(pp); +@@ -3087,6 +3102,7 @@ static int mvneta_change_mtu(struct net_ + return ret; + } + ++ on_each_cpu(mvneta_percpu_enable, pp, true); + mvneta_start_dev(pp); + mvneta_port_up(pp); + +@@ -3240,20 +3256,6 @@ static void mvneta_mdio_remove(struct mv + pp->phy_dev = NULL; + } + +-static void mvneta_percpu_enable(void *arg) +-{ +- struct mvneta_port *pp = arg; +- +- enable_percpu_irq(pp->dev->irq, IRQ_TYPE_NONE); +-} +- +-static void mvneta_percpu_disable(void *arg) +-{ +- struct mvneta_port *pp = arg; +- +- disable_percpu_irq(pp->dev->irq); +-} +- + /* Electing a CPU must be done in an atomic way: it should be done + * after or before the removal/insertion of a CPU and this function is + * not reentrant. |