Skip to content

Commit

Permalink
Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_dev…
Browse files Browse the repository at this point in the history
…ice_detach"

This reverts commit f49449f.

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: f49449f ("usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach")
Cc: stable@vger.kernel.org
Signed-off-by: Ferry Toth <fntoth@gmail.com>
Link: https://lore.kernel.org/r/20240620204832.24518-3-ftoth@exalondelft.nl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ferry Toth authored and Greg Kroah-Hartman committed Jun 27, 2024
1 parent 24bf27b commit c50814a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/function/u_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c50814a

Please sign in to comment.