I think I have found an error in the usbnet.c included in Linux 2.4.22.

My Zaurus won't connect unless I modify this file.

drivers/usb/usbnet.c has USB_DEVICE_ID_MATCH_INT_INFO set for Zaurus
devices:

    {
        .match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
                          | USB_DEVICE_ID_MATCH_DEVICE,
        .idVendor               = 0x04DD,
        .idProduct              = 0x8004,
        .bInterfaceClass        = 0x0a,
        .bInterfaceSubClass     = 0x00,
        .bInterfaceProtocol     = 0x00,
        .driver_info =  (unsigned long) &zaurus_sl5x00_info,
    }
    ...

I use hotplug, and the modules.usbmap derived from the above entry.

On my system, /sbin/hotplug is not called with an INTERFACE= argument.

/sbin/hotplug: arguments (usb) env (PWD=/etc/hotplug DEVICE=/proc/bus/usb/002/002 
ACTION=add DEBUG=yes OLDPWD=/ DEVFS=/proc/bus/usb TYPE=2/0/0 SHLVL=1 HOME=/ 
PATH=/bin:/sbin:/usr/sbin:/usr/bin PRODUCT=4dd/8004/0 _=/usr/bin/env)

Thus this never matches.

It appears from the code in usb.c that there will only be an INTERFACE=
argument if the class is 0, which it isn't.

This module (usbnet) seems to be the only one in the usb group that
sets this flag.  The macros in linux/usb.h only set one flag or another,
not two.

After the following change, it works well.

Is this an error in usbnet.c, or do I have something else that is old or
mis-configured?

-- 
Don Reid

---------------------------------------------------------------------
--- usbnet.c.orig       2003-11-15 09:23:07.000000000 -0800
+++ usbnet.c    2003-11-15 09:23:52.000000000 -0800
@@ -2376,8 +2376,7 @@
  * Same idea as above, but different framing.
  */
 {
-       .match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
-                         | USB_DEVICE_ID_MATCH_DEVICE, 
+       .match_flags    = USB_DEVICE_ID_MATCH_DEVICE, 
        .idVendor               = 0x04DD,
        .idProduct              = 0x8004,
        .bInterfaceClass        = 0x0a,
@@ -2385,8 +2384,7 @@
        .bInterfaceProtocol     = 0x00,
        .driver_info =  (unsigned long) &zaurus_sl5x00_info,
 }, {
-       .match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
-                         | USB_DEVICE_ID_MATCH_DEVICE, 
+       .match_flags    = USB_DEVICE_ID_MATCH_DEVICE, 
        .idVendor               = 0x04DD,
        .idProduct              = 0x8005,
        .bInterfaceClass        = 0x02,
@@ -2394,8 +2392,7 @@
        .bInterfaceProtocol     = 0x00,
        .driver_info =  (unsigned long) &zaurus_sla300_info,
 }, {
-       .match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
-                         | USB_DEVICE_ID_MATCH_DEVICE, 
+       .match_flags    = USB_DEVICE_ID_MATCH_DEVICE, 
        .idVendor               = 0x04DD,
        .idProduct              = 0x8006,
        .bInterfaceClass        = 0x02,
@@ -2403,8 +2400,7 @@
        .bInterfaceProtocol     = 0x00,
        .driver_info =  (unsigned long) &zaurus_slb500_info,
 }, {
-       .match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
-                         | USB_DEVICE_ID_MATCH_DEVICE, 
+       .match_flags    = USB_DEVICE_ID_MATCH_DEVICE, 
        .idVendor               = 0x04DD,
        .idProduct              = 0x8007,
        .bInterfaceClass        = 0x02,


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to