From: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Éric Piel" <E.A.B.Piel@tudelft.nl>,
"Sarah Sharp" <sarah.a.sharp@linux.intel.com>,
"Greg KH" <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org>,
"USB list" <linux-usb@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: Regression 3.0-rc6+ : khubd blocked (usbnet_cdc_unbind)
Date: Wed, 6 Jul 2011 18:44:25 +0200 [thread overview]
Message-ID: <201107061844.25689.a.miskiewicz@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1107061210070.1995-100000@iolanthe.rowland.org>
On Wednesday 06 of July 2011, Alan Stern wrote:
> On Wed, 6 Jul 2011, Éric Piel wrote:
> > Hello,
> > It seems I'm very unlucky this week and I've come across to what looks
> > like a second regression in the kernel. I'm running a version few
> > commits after 3.0-rc6, which includes commit e534c5b831c8 "fix
> > regression occurring during device removal".
> >
> > When I plug/unplug/plug a mobile phone, after waiting a few minutes I
> > get a "task khubd:621 blocked for more than 120 seconds." Note that it's
> > directly connected to my laptop, not via an external hub (although the
> > bug also happens with an external hub).
> >
> > Below is the whole dmesg log (with usb debug messages on)
> >
> > Let me know if you need me to investigate more, or maybe there is
> > already a fix for that bug?
>
> Ah -- this stack dump points out the reason for the hang. It looks
> like that "fix regression..." commit didn't go far enough; I neglected
> the fact that interfaces can be unbound out of order when a driver
> claims multiple interfaces.
>
> Adding this patch on top of that commit should fix this. Let me
> know what you both get.
This one makes usb working after resume from ram (current Linus git + this
patch).
>
> Alan Stern
>
>
>
> drivers/usb/core/message.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> Index: usb-3.0/drivers/usb/core/message.c
> ===================================================================
> --- usb-3.0.orig/drivers/usb/core/message.c
> +++ usb-3.0/drivers/usb/core/message.c
> @@ -1147,6 +1147,14 @@ void usb_disable_device(struct usb_devic
> * any drivers bound to them (a key side effect)
> */
> if (dev->actconfig) {
> + /*
> + * FIXME: In order to avoid self-deadlock involving the
> + * bandwidth_mutex, we have to mark all the interfaces
> + * before unregistering any of them.
> + */
> + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++)
> + dev->actconfig->interface[i]->unregistering = 1;
> +
> for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
> struct usb_interface *interface;
>
> @@ -1156,7 +1164,6 @@ void usb_disable_device(struct usb_devic
> continue;
> dev_dbg(&dev->dev, "unregistering interface %s\n",
> dev_name(&interface->dev));
> - interface->unregistering = 1;
> remove_intf_ep_devs(interface);
> device_del(&interface->dev);
> }
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
next prev parent reply other threads:[~2011-07-06 16:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-06 15:41 Regression 3.0-rc6+ : khubd blocked (usbnet_cdc_unbind) Éric Piel
2011-07-06 16:14 ` Alan Stern
2011-07-06 16:44 ` Arkadiusz Miskiewicz [this message]
2011-07-06 20:46 ` Greg KH
2011-07-06 21:03 ` [PATCH] USB: additional regression fix for device removal Alan Stern
2011-07-07 8:36 ` Éric Piel
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=201107061844.25689.a.miskiewicz@gmail.com \
--to=a.miskiewicz@gmail.com \
--cc=E.A.B.Piel@tudelft.nl \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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