Hi.  I'm pretty new to USB, so bear with me if I seem confused.

I have a new device I'm writing a driver for.  2.6.0-test1 detects the device
and puts it in the USB tree.  My driver's probe function is being called.

However, the user space utility lsusb cannot always see the device properly.
I am using lsusb from the usbutils-0.11 package I downloaded today.
The first time I use lsusb after plugging the device, I get output
like this:

Bus 001 Device 004: ID 0525:dead Netchip Technology Inc. 
  Language IDs: none (cannot get min. string descriptor; got len=-1, error=71:Protocol 
error)
cannot get string descriptor 1, error = Protocol error(71)
cannot get string descriptor 2, error = Protocol error(71)
string descriptor 3 invalid (bf bf; len=0)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0525 Netchip Technology Inc.
  idProduct          0xdead 
  bcdDevice            2.02
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize        512
        bInterval               1
  Language IDs: (length=4)
     0409 English(US)

After getting the above info out once, my device appears to time out.  I get
the following:

Bus 001 Device 010: ID 0525:dead Netchip Technology Inc. 
cannot get string descriptor 1, error = Connection timed out(110)
cannot get string descriptor 2, error = Connection timed out(110)
cannot get string descriptor 3, error = Connection timed out(110)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0525 Netchip Technology Inc.
  idProduct          0xdead 
  bcdDevice            2.02
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
cannot get config descriptor 0, Value too large for defined data type (75)
  Language IDs: none (invalid length string descriptor 32; len=25)

with a lot of
usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 10 rqt 128 rq 6 len 256 ret -110   
drivers/usb/core/message.c: usb_control/bulk_msg: timeout                       
in my log file.

However, I can insmod my driver at this point and the calls to
retval = usb_get_string (udev, 0x0409, 1, stringbuf, sizeof(stringbuf));
work fine.  The vendor returned from this call is _not_ Netchip Technology
Inc.  The usb_interface passed to my probe function also always contains
the proper endpoint descriptor although lsusb can no longer see it.

I have inserted and removed my driver many times without a single timeout
or protocol error.

Also, if I do 'cat /proc/bus/usb/devices' I see the following in my log:
ehci_hcd 0000:02:04.2: devpath 4 ep0in 3strikes                                 
ehci_hcd 0000:02:04.2: devpath 4 ep0in 3strikes                                 
ehci_hcd 0000:02:04.2: devpath 4 ep0in 3strikes                                 
ehci_hcd 0000:02:04.2: devpath 4 ep0in 3strikes                                 
ehci_hcd 0000:02:04.2: devpath 4 ep0in 3strikes                                 
ehci_hcd 0000:02:04.2: devpath 4 ep0in 3strikes                                 

This is my driver's entry in /proc/bus/usb/devices
T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
D:  Ver= 2.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0525 ProdID=dead Rev= 2.02
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

If there is a regression test or anything that would be useful for me to run
against this device, I'd be happy to do so.

cheers
-mark


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to