On Tue, Dec 17, 2002 at 08:19:09PM -0800, Linus Torvalds wrote:
> 
> The latest USB updates seem to be buggy.
> 
> My USB-2 setup that used to mostly work, now oopses in khubd in
> <storage_probe+0x541/0xb68> when I insert my CompactFlash reader into my
> external USB hub:

Here's a patch for this from Alan Stern.  I have a number of USB updates
to send to you, which I'll probably get finished up later tonight, but
feel free to apply this one to your tree now if you want to.

Let me know if this doesn't fix the problem.

thanks,

greg k-h


From: Alan Stern <[EMAIL PROTECTED]>
Subject: USB: usb-storage bugfix

Don't try to dereference the interrupt endpoint if it doesn't exist.


diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c Tue Dec 17 11:01:00 2002
+++ b/drivers/usb/storage/usb.c Tue Dec 17 11:01:00 2002
@@ -728,9 +728,13 @@
                        USB_ENDPOINT_NUMBER_MASK;
                ss->ep_out = ep_out->bEndpointAddress & 
                        USB_ENDPOINT_NUMBER_MASK;
-               ss->ep_int = ep_int->bEndpointAddress & 
-                       USB_ENDPOINT_NUMBER_MASK;
-               ss->ep_bInterval = ep_int->bInterval;
+               if (ep_int) {
+                       ss->ep_int = ep_int->bEndpointAddress & 
+                               USB_ENDPOINT_NUMBER_MASK;
+                       ss->ep_bInterval = ep_int->bInterval;
+               }
+               else
+                       ss->ep_int = ss->ep_bInterval = 0;
 
                /* allocate the URB, the usb_ctrlrequest, and the IRQ URB */
                if (usb_stor_allocate_urbs(ss))
@@ -771,9 +775,13 @@
                        USB_ENDPOINT_NUMBER_MASK;
                ss->ep_out = ep_out->bEndpointAddress & 
                        USB_ENDPOINT_NUMBER_MASK;
-               ss->ep_int = ep_int->bEndpointAddress & 
-                       USB_ENDPOINT_NUMBER_MASK;
-               ss->ep_bInterval = ep_int->bInterval;
+               if (ep_int) {
+                       ss->ep_int = ep_int->bEndpointAddress & 
+                               USB_ENDPOINT_NUMBER_MASK;
+                       ss->ep_bInterval = ep_int->bInterval;
+               }
+               else
+                       ss->ep_int = ss->ep_bInterval = 0;
 
                /* establish the connection to the new device */
                ss->ifnum = ifnum;


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to