* [PATCH] USB: Eliminate wait following interface unregistration
[not found] ` <20040327230634.5642c6ad.akpm@osdl.org>
@ 2004-03-28 7:12 ` Greg KH
0 siblings, 0 replies; only message in thread
From: Greg KH @ 2004-03-28 7:12 UTC (permalink / raw)
To: torvalds; +Cc: Andrew Morton, stern, linux-usb-devel, linux-kernel
Hi,
The following patch from Alan Stern <stern@rowland.harvard.edu> fixes a
bug in the current USB code that causes khubd to hang when a device is
removed from the system, thereby preventing any future USB device
changes (like adding or removing other devices) from happening.
Both Andrew and I can easily duplicate this bug against the current -bk
tree.
It's not a perfect fix, but it works for now, and I will spend the next
week working on restructuring the code so this is handled properly.
thanks,
greg k-h
--- 1.73/drivers/usb/core/message.c Wed Mar 17 14:16:47 2004
+++ edited/drivers/usb/core/message.c Wed Mar 24 10:17:04 2004
@@ -794,9 +794,6 @@
static void release_interface(struct device *dev)
{
- struct usb_interface *interface = to_usb_interface(dev);
-
- complete(interface->released);
}
/*
@@ -828,16 +825,12 @@
if (dev->actconfig) {
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface;
- struct completion intf_completion;
/* remove this interface */
interface = dev->actconfig->interface[i];
dev_dbg (&dev->dev, "unregistering interface %s\n",
interface->dev.bus_id);
- init_completion (&intf_completion);
- interface->released = &intf_completion;
device_unregister (&interface->dev);
- wait_for_completion (&intf_completion);
}
dev->actconfig = 0;
if (dev->state == USB_STATE_CONFIGURED)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-28 7:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.44L0.0403272249300.4020-100000@netrider.rowland.org>
[not found] ` <20040328061935.GA6605@kroah.com>
[not found] ` <20040327223848.23d38d2a.akpm@osdl.org>
[not found] ` <20040328064405.GA6451@kroah.com>
[not found] ` <20040328065327.GA6717@kroah.com>
[not found] ` <20040327230634.5642c6ad.akpm@osdl.org>
2004-03-28 7:12 ` [PATCH] USB: Eliminate wait following interface unregistration Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.