If there are no interfaces on the active configuration, you get an
oops.  I'm guessing this probably shouldn't ever happen, but it does
on occassion with the balky SA-1111 OHCI HC.

-ch
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]


PATCH_FOLLOWS
KernelVersion: 2.5.18-rmk1
diff -X ../dontdiff.txt -Naur linux-2.5.18-rmk1/drivers/usb/core/usb.c 
linux-2.5.18-rmk1-ch1/drivers/usb/core/usb.c
--- linux-2.5.18-rmk1/drivers/usb/core/usb.c    Fri May 24 18:55:27 2002
+++ linux-2.5.18-rmk1-ch1/drivers/usb/core/usb.c        Thu May 30 14:39:09 2002
@@ -36,9 +36,9 @@
 #include <asm/byteorder.h>
 
 #ifdef CONFIG_USB_DEBUG
-       #define DEBUG
+#      define DEBUG
 #else
-       #undef DEBUG
+#      undef DEBUG
 #endif
 #include <linux/usb.h>
 
@@ -850,7 +850,8 @@
                            dev->descriptor.bDeviceClass,
                            dev->descriptor.bDeviceSubClass,
                            dev->descriptor.bDeviceProtocol) + 1;
-       if (dev->descriptor.bDeviceClass == 0) {
+       if (dev->descriptor.bDeviceClass == 0 &&
+           dev->actconfig->bNumInterfaces > 0) {
                int alt = dev->actconfig->interface [0].act_altsetting;
 
                /* a simple/common case: one config, one interface, one driver

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to