From 98c81a17a708fff6360be194546a93e6cfa3a40c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 27 Mar 2004 19:16:38 -0800 Subject: [PATCH] [PATCH] USB: Eliminate wait following interface unregistration This patch from Alan Stern 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. --- drivers/usb/core/message.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 5bd4d8ab05ad5..63aff4a261061 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -794,9 +794,6 @@ void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf) static void release_interface(struct device *dev) { - struct usb_interface *interface = to_usb_interface(dev); - - complete(interface->released); } /* @@ -828,16 +825,12 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) 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) -- 2.53.0