* [PATCH v1 0/2] "usb: gadget: u_ether: revert netif_device_detach change
@ 2024-06-06 21:02 Ferry Toth
2024-06-06 21:02 ` [PATCH v1 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
2024-06-06 21:02 ` [PATCH v1 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach" Ferry Toth
0 siblings, 2 replies; 5+ messages in thread
From: Ferry Toth @ 2024-06-06 21:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ricardo B. Marliere, Kees Cook, Linyu Yuan,
Justin Stitt, Ferry Toth, Richard Acayan, Hardik Gajjar,
linux-usb, linux-kernel
Cc: Andy Shevchenko, s.hauer, jonathanh, paul, quic_eserrao, erosca,
regressions
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.
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] 5+ messages in thread* [PATCH v1 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment"
2024-06-06 21:02 [PATCH v1 0/2] "usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
@ 2024-06-06 21:02 ` Ferry Toth
2024-06-20 17:35 ` Greg Kroah-Hartman
2024-06-06 21:02 ` [PATCH v1 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach" Ferry Toth
1 sibling, 1 reply; 5+ messages in thread
From: Ferry Toth @ 2024-06-06 21:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ricardo B. Marliere, Kees Cook, Linyu Yuan,
Justin Stitt, Ferry Toth, Richard Acayan, Hardik Gajjar,
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 related [flat|nested] 5+ messages in thread* Re: [PATCH v1 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment"
2024-06-06 21:02 ` [PATCH v1 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
@ 2024-06-20 17:35 ` Greg Kroah-Hartman
2024-06-20 19:00 ` Ferry Toth
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-20 17:35 UTC (permalink / raw)
To: Ferry Toth
Cc: Ricardo B. Marliere, Kees Cook, Linyu Yuan, Justin Stitt,
Richard Acayan, Hardik Gajjar, linux-usb, linux-kernel,
Andy Shevchenko, s.hauer, jonathanh, paul, quic_eserrao, erosca,
regressions, Ferry Toth, stable
On Thu, Jun 06, 2024 at 11:02:31PM +0200, Ferry Toth wrote:
> 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(-)
You have to sign-off on your changes, otherwise the tools will reject
them (as will I). Please fix up for both of these and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v1 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment"
2024-06-20 17:35 ` Greg Kroah-Hartman
@ 2024-06-20 19:00 ` Ferry Toth
0 siblings, 0 replies; 5+ messages in thread
From: Ferry Toth @ 2024-06-20 19:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ferry Toth
Cc: Ricardo B. Marliere, Kees Cook, Linyu Yuan, Justin Stitt,
Richard Acayan, Hardik Gajjar, linux-usb, linux-kernel,
Andy Shevchenko, s.hauer, jonathanh, paul, quic_eserrao, erosca,
regressions, stable
Hi Greg,
Op 20-06-2024 om 19:35 schreef Greg Kroah-Hartman:
> On Thu, Jun 06, 2024 at 11:02:31PM +0200, Ferry Toth wrote:
>> 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(-)
>
> You have to sign-off on your changes, otherwise the tools will reject
> them (as will I). Please fix up for both of these and resend.
Oops, I knew that. Just didn't notice SoB wasn't auto added.
I'll that up, sorry.
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach"
2024-06-06 21:02 [PATCH v1 0/2] "usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
2024-06-06 21:02 ` [PATCH v1 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
@ 2024-06-06 21:02 ` Ferry Toth
1 sibling, 0 replies; 5+ messages in thread
From: Ferry Toth @ 2024-06-06 21:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ricardo B. Marliere, Kees Cook, Linyu Yuan,
Justin Stitt, Ferry Toth, Richard Acayan, Hardik Gajjar,
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 related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-20 19:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 21:02 [PATCH v1 0/2] "usb: gadget: u_ether: revert netif_device_detach change Ferry Toth
2024-06-06 21:02 ` [PATCH v1 1/2] Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment" Ferry Toth
2024-06-20 17:35 ` Greg Kroah-Hartman
2024-06-20 19:00 ` Ferry Toth
2024-06-06 21:02 ` [PATCH v1 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach" Ferry Toth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox