usb: gadget: u_ether: revert netif_device_detach change
Subsystems (2)
v2 cover usb: gadget: u_ether: revert netif_device_detach change
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(-)
Signature · 1 line
2.43.0
PATCH v2 1/2 Revert "usb: gadget: u_ether: Re-attach netif device to mirror detachment"
This reverts commit 76c945730cdffb572c7767073cc6515fd3f646b4.
Prerequisite revert for the reverting of the original commit f49449fbc21e.
--- drivers/usb/gadget/function/u_ether.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/gadget/function/u_ether.c +0 -2
@@ -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);
Signature · 1 line
2.43.0
PATCH v2 2/2 Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach"
In reply to Ferry TothThis 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.
--- drivers/usb/gadget/function/u_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/u_ether.c +1 -1
@@ -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
Signature · 1 line
2.43.0
Oops, used the wrong hash. It's late... Sorry
v3 follows.
Op 20-06-2024 om 22:38 schreef Ferry Toth:
Quoted 18 lines
usb: gadget:
u_ether: revertnetif_device_detachchangeAs agreed with the author, the
netif_device_detachchange 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: Replacenetif_stop_queuewith
netif_device_detach"drivers/usb/gadget/function/u_ether.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)