* [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change
@ 2024-06-20 20:38 Ferry Toth
2024-06-20 20:38 ` [PATCH v2 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ferry Toth @ 2024-06-20 20:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ferry Toth, Hardik Gajjar,
Ricardo B. Marliere, Kees Cook, Richard Acayan, Linyu Yuan,
Justin Stitt, linux-usb, linux-kernel
Cc: Andy Shevchenko, s.hauer, jonathanh, paul, quic_eserrao, erosca,
regressions
usb: gadget: u_ether: revert netif_device_detach change
As agreed with the author, the netif_device_detach change is going to be reverted by
this series, so we will collaborate on a new one in the future that
brings no regressions.
v2:
- Add missing SoB (Greg)
Ferry Toth (2):
Revert "usb: gadget: u_ether: Re-attach netif device to mirror
detachment"
Revert "usb: gadget: u_ether: Replace netif_stop_queue with
netif_device_detach"
drivers/usb/gadget/function/u_ether.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment"
2024-06-20 20:38 [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
@ 2024-06-20 20:38 ` Ferry Toth
2024-06-20 20:38 ` [PATCH v2 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach" Ferry Toth
2024-06-20 20:51 ` [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
2 siblings, 0 replies; 4+ messages in thread
From: Ferry Toth @ 2024-06-20 20:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ferry Toth, Hardik Gajjar,
Ricardo B. Marliere, Kees Cook, Richard Acayan, Linyu Yuan,
Justin Stitt, linux-usb, linux-kernel
Cc: Andy Shevchenko, s.hauer, jonathanh, paul, quic_eserrao, erosca,
regressions, Ferry Toth, stable
This reverts commit 76c945730cdffb572c7767073cc6515fd3f646b4.
Prerequisite revert for the reverting of the original commit f49449fbc21e.
Fixes: 76c945730cdf ("usb: gadget: u_ether: Re-attach netif device to mirror detachment")
Fixes: f49449fbc21e ("usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach")
Reported-by: Ferry Toth <fntoth@gmail.com>
Cc: stable@vger.kernel.org
---
drivers/usb/gadget/function/u_ether.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index 11dd0b9e847f..aa0511c3a62c 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -1163,8 +1163,6 @@ 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach"
2024-06-20 20:38 [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
2024-06-20 20:38 ` [PATCH v2 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
@ 2024-06-20 20:38 ` Ferry Toth
2024-06-20 20:51 ` [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
2 siblings, 0 replies; 4+ messages in thread
From: Ferry Toth @ 2024-06-20 20:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ferry Toth, Hardik Gajjar,
Ricardo B. Marliere, Kees Cook, Richard Acayan, Linyu Yuan,
Justin Stitt, linux-usb, linux-kernel
Cc: Andy Shevchenko, s.hauer, jonathanh, paul, quic_eserrao, erosca,
regressions, Ferry Toth, stable
This reverts commit f49449fbc21e7e9550a5203902d69c8ae7dfd918.
This commit breaks u_ether on some setups (at least Merrifield). The fix
"usb: gadget: u_ether: Re-attach netif device to mirror detachment" party
restores u-ether. However the netif usb: remains up even usb is switched
from device to host mode. This creates problems for user space as the
interface remains in the routing table while not realy present and network
managers (connman) not detecting a network change.
Various attempts to find the root cause were unsuccesful up to now. Therefore
revert until a solution is found.
Link: https://lore.kernel.org/linux-usb/20231006141231.7220-1-hgajjar@de.adit-jv.com/
Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reported-by: Ferry Toth <fntoth@gmail.com>
Fixes: f49449fbc21e ("usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach")
Cc: stable@vger.kernel.org
---
drivers/usb/gadget/function/u_ether.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index aa0511c3a62c..95191083b455 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -1200,7 +1200,7 @@ void gether_disconnect(struct gether *link)
DBG(dev, "%s\n", __func__);
- netif_device_detach(dev->net);
+ netif_stop_queue(dev->net);
netif_carrier_off(dev->net);
/* disable endpoints, forcing (synchronous) completion
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change
2024-06-20 20:38 [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
2024-06-20 20:38 ` [PATCH v2 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
2024-06-20 20:38 ` [PATCH v2 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach" Ferry Toth
@ 2024-06-20 20:51 ` Ferry Toth
2 siblings, 0 replies; 4+ messages in thread
From: Ferry Toth @ 2024-06-20 20:51 UTC (permalink / raw)
To: Ferry Toth, Greg Kroah-Hartman, Hardik Gajjar,
Ricardo B. Marliere, Kees Cook, Richard Acayan, Linyu Yuan,
Justin Stitt, linux-usb, linux-kernel
Cc: Andy Shevchenko, s.hauer, jonathanh, paul, quic_eserrao, erosca,
regressions
Oops, used the wrong hash. It's late... Sorry
v3 follows.
Op 20-06-2024 om 22:38 schreef Ferry Toth:
> usb: gadget: u_ether: revert netif_device_detach change
>
> As agreed with the author, the netif_device_detach change is going to be reverted by
> this series, so we will collaborate on a new one in the future that
> brings no regressions.
>
> v2:
> - Add missing SoB (Greg)
>
> Ferry Toth (2):
> Revert "usb: gadget: u_ether: Re-attach netif device to mirror
> detachment"
> Revert "usb: gadget: u_ether: Replace netif_stop_queue with
> netif_device_detach"
>
> drivers/usb/gadget/function/u_ether.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-20 20:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-20 20:38 [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
2024-06-20 20:38 ` [PATCH v2 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
2024-06-20 20:38 ` [PATCH v2 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach" Ferry Toth
2024-06-20 20:51 ` [PATCH v2 0/2] usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®