linux-postmarketos-allwinner: Import patch for u_ether regression (MR 4706)
This fixes the USB networking issue, see: https://patchwork.kernel.org/project/linux-usb/patch/20231218164532.411125-2-mailingradian@gmail.com/ Thanks to Alexey Min to pointing me at the patch! [ci:skip-build]: Already built successfully in CI.
This commit is contained in:
parent
79d3be2826
commit
4c3bf9ce07
2 changed files with 46 additions and 0 deletions
|
|
@ -0,0 +1,44 @@
|
|||
From 5f4158b3feecb4cc9fcae276cec2352ae3a03ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Acayan <mailingradian@gmail.com>
|
||||
Date: Mon, 18 Dec 2023 11:45:33 -0500
|
||||
Subject: [PATCH] usb: gadget: u_ether: Re-attach netif device to mirror
|
||||
detachment
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In 6.7-rc1, there was a netif_device_detach call added to the
|
||||
gether_disconnect function. This clears the __LINK_STATE_PRESENT bit of
|
||||
the netif device and suppresses pings (ICMP messages) and TCP connection
|
||||
requests from the connected host. If userspace temporarily disconnects
|
||||
the gadget, such as by temporarily removing configuration in the gadget
|
||||
configfs interface, network activity should continue to be processed
|
||||
when the gadget is re-connected. Mirror the netif_device_detach call
|
||||
with a netif_device_attach call in gether_connect to fix re-connecting
|
||||
gadgets.
|
||||
|
||||
Link: https://gitlab.com/postmarketOS/pmaports/-/tree/6002e51b7090aeeb42947e0ca7ec22278d7227d0/main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-tethering.sh
|
||||
Fixes: f49449fbc21e ("usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach")
|
||||
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
|
||||
Tested-by: Luca Weiss <luca@z3ntu.xyz>
|
||||
Tested-by: Duje Mihanović <duje.mihanovic@skole.hr>
|
||||
---
|
||||
drivers/usb/gadget/function/u_ether.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
|
||||
index 18fc4fb011..5817a0993a 100644
|
||||
--- a/drivers/usb/gadget/function/u_ether.c
|
||||
+++ b/drivers/usb/gadget/function/u_ether.c
|
||||
@@ -1159,6 +1159,8 @@ struct net_device *gether_connect(struct gether *link)
|
||||
if (netif_running(dev->net))
|
||||
eth_start(dev, GFP_ATOMIC);
|
||||
|
||||
+ netif_device_attach(dev->net);
|
||||
+
|
||||
/* on error, disable any endpoints */
|
||||
} else {
|
||||
(void) usb_ep_disable(link->out_ep);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
|
@ -46,6 +46,7 @@ source="$pkgname-$_tag.tar.gz::https://codeberg.org/megi/linux/archive/$_tag.tar
|
|||
0012-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch
|
||||
0013-Revert-usb-quirks-Add-USB_QUIRK_RESET-for-Quectel-EG25G-Modem.patch
|
||||
0014-usb-serial-option-add-reset-resume-callback-for-WWAN.patch
|
||||
0015-usb-gadget-u_ether-Re-attach-netif-device-to-mirror.patch
|
||||
"
|
||||
builddir="$srcdir/linux"
|
||||
|
||||
|
|
@ -100,4 +101,5 @@ b7c084bb32cfc18defcec77966f1944fd3b33bb48769a4c0e257709d0f3898c5e0ca2a50c39a5d45
|
|||
370e963805a4c984dc501a6a6f686cac059485a275370c5f55de0841e227c5f6652abb38ad935c8dd046014e632e70129d3f8fbeae9650fe7de6f0d10e9cdc3a 0012-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch
|
||||
c766911f76d36b997582533707d7d7a089ed1272e49a79dbe75f7c1eafef0ba3f1417d6c66f25e12e56124e0cd4bb9f443d400236e252ef1c43d53def9392a87 0013-Revert-usb-quirks-Add-USB_QUIRK_RESET-for-Quectel-EG25G-Modem.patch
|
||||
382e6e8785235788101459ae47c940ec85831007c61e3f14c4e3a43abfa21b95cdaa6bdd1b7fdd6fd26944f4c629d41b9ab776e89d9a18778fbc9f6a7785444b 0014-usb-serial-option-add-reset-resume-callback-for-WWAN.patch
|
||||
3ce3bc02e4cb401f5834b9607d50fe26e0cbd7d6f5e32f1ab092660185ff01b253a759be5e6dfb46aa629dc0871f935d93746a0b55ede49f194b617dda87f766 0015-usb-gadget-u_ether-Re-attach-netif-device-to-mirror.patch
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue