Well... my CDCEther driver has always told me that it was a "MAC get failed
error = 22" whenever I loaded it after 'corrupting' the cable modem with usbnet:

//-------------------------------------------------------
hub.c: new USB device 00:02.0-2, assigned address 3
CDCEther.c: Ethernet information found at device configuration.  Trying to use
it anyway.
CDCEther.c: Found Header descriptor, CDC version 110.
CDCEther.c: Imperfect filtering support - need sw hashing
CDCEther.c: Can't use SetEthernetMulticastFilters request
CDCEther.c: detected BULK OUT packets of size 64
CDCEther.c: interrupt address: 5
CDCEther.c: interrupt interval: 64
CDCEther.c: Attempting to get MAC address returned 1 bytes
CDCEther.c: eth1: 000CE53D2E1B Broadcom Corporation USB Cable Modem
CDCEther.c: eth1: 00:00:00:00:00:00
//-------------------------------------------------------

Altough that was the first time I see it say "returned 1 bytes", normally it
just says that it failed to get the mac address with an error code of 75 or 22.
Odd.
Anyway, lsusb -v yields the following (I decided to include everything.. which
is just the ohci, ehci and modem data):

//-------------------------------------------------------
Bus 003 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.5 ohci_hcd
  iProduct                2 nVidia Corporation nForce2 USB Controller (#2)
  iSerial                 1 0000:00:02.1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          2
        bInterval             255
  Language IDs: (length=4)
     0409 English(US)

Bus 002 Device 002: ID 07b2:5100 Motorola BCS, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        32
  idVendor           0x07b2 Motorola BCS, Inc.
  idProduct          0x5100 
  bcdDevice            1.01
  iManufacturer           1     
  iProduct                2 Broadcom Corporation
  iSerial                 3 USB Cable Modem
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           80
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
  unknown descriptor type: 05 24 00 10 01
  unknown descriptor type: 05 24 06 00 01
  unknown descriptor type: 0d 24 0f 03 00 00 00 00 ea 05 00 00 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0 
      iInterface              5 000CE53D2E1B
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          8
        bInterval              64
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              6 Communication Interface Class
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              6 Data Interface Class
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
  Language IDs: (length=42)
     0044 Tatar(Tatar)
     0061 Nepali(Nepali)
     0074 (null)((null))
     0061 Nepali(Nepali)
     0020 Urdu(Urdu)
     0049 Tamil(Tamil)
     006e (null)((null))
     0074 (null)((null))
     0065 (null)((null))
     0072 (null)((null))
     0066 (null)((null))
     0061 Nepali(Nepali)
     0063 (null)((null))
     0065 (null)((null))
     0020 Urdu(Urdu)
     0043 Uzbek(Uzbek)
     006c (null)((null))
     0061 Nepali(Nepali)
     0073 (null)((null))
     0073 (null)((null))

Bus 002 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.5 ohci_hcd
  iProduct                2 nVidia Corporation nForce2 USB Controller
  iSerial                 1 0000:00:02.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          2
        bInterval             255
  Language IDs: (length=4)
     0409 English(US)

Bus 001 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         1 
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.5 ehci_hcd
  iProduct                2 nVidia Corporation nForce2 USB Controller
  iSerial                 1 0000:00:02.2
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          2
        bInterval              12
  Language IDs: (length=4)
     0409 English(US)
//-------------------------------------------------------

Wondering if the problem could had been caused by another driver, I removed all
modules until I was left with only usbcore and ehci_hcd, and then connected the
modem. The problem persists so I think it does not has to do with drivers (I
have mostly everything done as modules except for the core stuff like hd,
filesystems and keyboard drivers), looks like the problem lies within usbnet (or
ehci_hcd) themselves (of course, unless my modem is to be blamed for being an
utter piece of non-usb-specs-conforming crap).
I also checked if there would be any difference between loading the modem with
ehci enabled or not and the only difference was that pretty much every device's
Bus line was increased by one (so instead of being Bus 001 it was Bus 002),
altough I think that doesn't has anything to do with it.
Finally.. here's how usbls -v looks like under 2.4 (ie when the modem works):

//-------------------------------------------------------
Bus 002 Device 003: ID 07b2:5100 Motorola BCS, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        32
  idVendor           0x07b2 Motorola BCS, Inc.
  idProduct          0x5100 
  bcdDevice            1.01
  iManufacturer           1 Broadcom Corporation
  iProduct                2 USB Cable Modem
  iSerial                 3 000CE53D2E1B
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           80
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
  unknown descriptor type: 05 24 00 10 01
  unknown descriptor type: 05 24 06 00 01
  unknown descriptor type: 0d 24 0f 03 00 00 00 00 ea 05 00 00 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0 
      iInterface              5 Communication Interface Class
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          8
        bInterval              64
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              6 Data Interface Class
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              6 Data Interface Class
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
  Language IDs: (length=4)
     0409 English(US)
//-------------------------------------------------------
I ran a vimdiff between both, and lo and behold (CDCEther is on the left, usbnet
on the right)....

//-------------------------------------------------------
iManufacturer   1 Broadcom Corporation          |    iManufacturer           1 
iProduct        2 USB Cable Modem               |    iProduct                2 Broadcom
Corporation
iSerial         3 000CE53D2E1B                  |    iSerial                 3 USB
Cable Modem
iInterface      5 Communication Interface Class |    iInterface              5
000CE53D2E1B
//-------------------------------------------------------

I looks like somewhere usbnet read the data with an offset it shouldn't have (or
did the string descriptor came with an unexpected offset?). Hmm... interesting
(this would explain why it fails on the get HW address... instead of the
hardware address it is reading "Communication Interface Class"!)

On Sun, 9 May 2004 10:40:29 -0400 (EDT)
Alan Stern <[EMAIL PROTECTED]> wrote:

> On Sun, 9 May 2004, Zariel Skotlex wrote:
> 
> > On Sat, 08 May 2004 19:51:42 -0700
> > David Brownell <[EMAIL PROTECTED]> wrote:
> > 
> > Ok... applied that patch and rewent through the boot-up sequence and checked
> > the output of dmesg.
> > //-------------------------------------------------------
> > ehci_hcd 0000:00:02.2: GetStatus port 1 status 003402 POWER OWNER sig=k  CSC
> > hub 1-0:1.0: port 1, status 0, change 1, 12 Mb/s
> > ehci_hcd 0000:00:02.2: GetStatus port 5 status 001803 POWER sig=j  CSC
> > CONNECT hub 1-0:1.0: port 5, status 501, change 1, 480 Mb/s
> > hub 1-0:1.0: debounce: port 5: delay 100ms stable 4 status 0x501
> > ehci_hcd 0000:00:02.2: port 5 full speed --> companion
> > ehci_hcd 0000:00:02.2: GetStatus port 5 status 003001 POWER OWNER sig=se0 
> > CONNECT
> > ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [3] = 0x00010101 CSC PPS
> > CCS hub 2-0:1.0: port 3, status 101, change 1, 12 Mb/s
> > hub 2-0:1.0: debounce: port 3: delay 100ms stable 4 status 0x101
> > ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [3] = 0x00100103 PRSC
> > PPS PES CCS
> > usb 2-3: new full speed USB device using address 3
> > usb 2-3: new device strings: Mfr=1, Product=2, SerialNumber=3
> > usb_control_msg2: result = 4
> > drivers/usb/core/message.c: USB device number 3 default language ID 0x409
> > usb_control_msg2: result = 2
> > usb 2-3: Product: USB Cable Modem
> > usb_control_msg2: result = 0
> > usb_control_msg2: result = 2
> > drivers/usb/core/usb.c: usb_hotplug
> > usb 2-3: registering 2-3:1.0 (config #1, interface 0)
> > drivers/usb/core/usb.c: usb_hotplug
> > usb 2-3: registering 2-3:1.1 (config #1, interface 1)
> > drivers/usb/core/usb.c: usb_hotplug
> > usbnet 2-3:1.0: usb_probe_interface
> > usbnet 2-3:1.0: usb_probe_interface - got id
> > usbnet 2-3:1.0: CDC descriptors on config
> > usb_control_msg2: result = 26
> > usbnet: probe of 2-3:1.0 failed with error -22
> 
> There's only one place that error can be coming from; it's where the CDC 
> driver tries to retrieve the Ethernet (MAC) address from the device.  
> That's the get_ethernet_addr() routine in usbnet.c.
> 
> The ethernet address stored as a string descriptor, and the call to read 
> it isn't working.  The result from usb_control_msg2 should always be 
> either 0 or 2 (except the first time when it should be 4) -- the 26 
> indicates that the modem doesn't like what it has been asked to do.
> 
> It could be this is because some of the other descriptors are messed up.  
> The output from 'lsusb -v' would be useful here.  Make sure you run it
> while the modem is in a "working" state, before it gets messed up by any
> drivers.
> 
> Alan Stern
> 

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to