Re: usb-uhci *BUG*

Greg KH (greg@kroah.com)
Sun, 14 Apr 2002 09:43:55 -0700


On Sun, Apr 14, 2002 at 06:32:47PM +0100, Ian Molton wrote:
>
> > What devices do you have plugged in?
>
> one alcatel usb speedtouch ADSL modem, using the 'user mode' driver.

Ah, please try using the patch below from David Brownell to fix this
problem. I've already applied this to my trees, and will get pushed to
the main kernels soon.

Let me know if this helps or not.

thanks,

greg k-h

--- drivers/usb-dist/devio.c Tue Nov 20 22:39:48 2001
+++ drivers/usb/devio.c Wed Mar 20 08:47:37 2002
@@ -286,7 +286,9 @@
}

/*
- * interface claiming
+ * interface claims are made only at the request of user level code,
+ * which can also release them (explicitly or by closing files).
+ * they're also undone when devices disconnect.
*/

static void *driver_probe(struct usb_device *dev, unsigned int intf,
@@ -299,7 +301,20 @@
{
struct dev_state *ps = (struct dev_state *)context;

+ if (!ps)
+ return;
+
+ /* this waits till synchronous requests complete */
+ down_write (&ps->devsem);
+
+ /* prevent new I/O requests */
+ ps->dev = 0;
ps->ifclaimed = 0;
+
+ /* force async requests to complete */
+ destroy_all_async (ps);
+
+ up_write (&ps->devsem);
}

struct usb_driver usbdevfs_driver = {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/