diff --git a/patches.suse/net-ethernet-freescale-rework-quiesce-activate-for-u.patch b/patches.suse/net-ethernet-freescale-rework-quiesce-activate-for-u.patch new file mode 100644 index 0000000..e0b15bb --- /dev/null +++ b/patches.suse/net-ethernet-freescale-rework-quiesce-activate-for-u.patch @@ -0,0 +1,77 @@ +From a172507090f97b255ac1f6bdad2712f133dfedee Mon Sep 17 00:00:00 2001 +From: Valentin Longchamp +Date: Wed, 20 May 2020 17:53:50 +0200 +Subject: [PATCH] net/ethernet/freescale: rework quiesce/activate for ucc_geth +Git-commit: 79dde73cf9bcf1dd317a2667f78b758e9fe139ed +Patch-mainline: v5.7-rc7 +References: git-fixes + +ugeth_quiesce/activate are used to halt the controller when there is a +link change that requires to reconfigure the mac. + +The previous implementation called netif_device_detach(). This however +causes the initial activation of the netdevice to fail precisely because +it's detached. For details, see [1]. + +A possible workaround was the revert of commit +net: linkwatch: add check for netdevice being present to linkwatch_do_dev +However, the check introduced in the above commit is correct and shall be +kept. + +The netif_device_detach() is thus replaced with +netif_tx_stop_all_queues() that prevents any tranmission. This allows to +perform mac config change required by the link change, without detaching +the corresponding netdevice and thus not preventing its initial +activation. + +[1] https://lists.openwall.net/netdev/2020/01/08/201 + +Signed-off-by: Valentin Longchamp +Acked-by: Matteo Ghidoni +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/freescale/ucc_geth.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c +index 168720d5b476..c3781334ada2 100644 +--- a/drivers/net/ethernet/freescale/ucc_geth.c ++++ b/drivers/net/ethernet/freescale/ucc_geth.c +@@ -45,6 +45,7 @@ + #include + #include + #include ++#include + + #include "ucc_geth.h" + +@@ -1551,11 +1552,8 @@ static int ugeth_disable(struct ucc_geth_private *ugeth, enum comm_dir mode) + + static void ugeth_quiesce(struct ucc_geth_private *ugeth) + { +- /* Prevent any further xmits, plus detach the device. */ +- netif_device_detach(ugeth->ndev); +- +- /* Wait for any current xmits to finish. */ +- netif_tx_disable(ugeth->ndev); ++ /* Prevent any further xmits */ ++ netif_tx_stop_all_queues(ugeth->ndev); + + /* Disable the interrupt to avoid NAPI rescheduling. */ + disable_irq(ugeth->ug_info->uf_info.irq); +@@ -1568,7 +1566,10 @@ static void ugeth_activate(struct ucc_geth_private *ugeth) + { + napi_enable(&ugeth->napi); + enable_irq(ugeth->ug_info->uf_info.irq); +- netif_device_attach(ugeth->ndev); ++ ++ /* allow to xmit again */ ++ netif_tx_wake_all_queues(ugeth->ndev); ++ __netdev_watchdog_up(ugeth->ndev); + } + + /* Called every time the controller might need to be made +-- +2.16.4 + diff --git a/series.conf b/series.conf index 093ebc1..69b03a5 100644 --- a/series.conf +++ b/series.conf @@ -56388,6 +56388,7 @@ patches.suse/net-qrtr-Fix-passing-invalid-reference-to-qrtr_local.patch patches.suse/net-ipip-fix-wrong-address-family-in-init-error-path.patch patches.suse/sctp-Start-shutdown-on-association-restart-if-in-SHU.patch + patches.suse/net-ethernet-freescale-rework-quiesce-activate-for-u.patch patches.suse/mlxsw-spectrum-Fix-use-after-free-of-split-unsplit-t.patch patches.suse/0002-net-sun-fix-missing-release-regions-in-cas_init_one.patch patches.suse/net-mlx4_core-fix-a-memory-leak-bug.patch