From: Ferry Toth <ftoth@exalondelft.nl>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Ricardo B. Marliere" <ricardo@marliere.net>,
Kees Cook <kees@kernel.org>,
Linyu Yuan <quic_linyyuan@quicinc.com>,
Justin Stitt <justinstitt@google.com>,
Ferry Toth <ftoth@exalondelft.nl>,
Richard Acayan <mailingradian@gmail.com>,
Hardik Gajjar <hgajjar@de.adit-jv.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>,
s.hauer@pengutronix.de, jonathanh@nvidia.com,
paul@crapouillou.net, quic_eserrao@quicinc.com,
erosca@de.adit-jv.com, regressions@leemhuis.info,
Ferry Toth <fntoth@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH v1 2/2] Revert "usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach"
Date: Thu, 6 Jun 2024 23:02:32 +0200 [thread overview]
Message-ID: <20240606210436.54100-3-ftoth@exalondelft.nl> (raw)
In-Reply-To: <20240606210436.54100-1-ftoth@exalondelft.nl>
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
prev parent reply other threads:[~2024-06-06 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Ferry Toth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240606210436.54100-3-ftoth@exalondelft.nl \
--to=ftoth@exalondelft.nl \
--cc=andriy.shevchenko@intel.com \
--cc=erosca@de.adit-jv.com \
--cc=fntoth@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hgajjar@de.adit-jv.com \
--cc=jonathanh@nvidia.com \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mailingradian@gmail.com \
--cc=paul@crapouillou.net \
--cc=quic_eserrao@quicinc.com \
--cc=quic_linyyuan@quicinc.com \
--cc=regressions@leemhuis.info \
--cc=ricardo@marliere.net \
--cc=s.hauer@pengutronix.de \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox