Re: Fwd: umodem (4) recognize a CDC-ACM device

From: Marcelo/Porks <marcelorossi_at_gmail.com>
Date: Thu, 3 Jun 2010 11:22:33 -0300
On Wed, Jun 2, 2010 at 1:25 PM, Hans Petter Selasky <hselasky_at_c2i.net> wrote:
> Hi,
>
> The problem is that LOW speed does not support BULK transfers according to the
> USB specification. I guess we could switch that support on, though I'd rather
> stick with the spec.
>
> Try changing this line in:
>
> src/sys/dev/usb/usb_transfer.c
>
>                [USB_SPEED_LOW] = 0,    /* not supported */
> Into:
>
>                [USB_SPEED_LOW] = 8,    /* not supported according to USB
> spec. */
>

Hi, Thanks again for the reply.

I changed this line [1], but the result was the same:

BARAD-DUR% uname -a
FreeBSD BARAD-DUR.BUTECO 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r208760M:
Thu Jun  3 10:13:44 BRT 2010
porks_at_BARAD-DUR.BUTECO:/usr/obj/mnt/ad2s1d/data/src/sys/BARAD-DUR
i386

BARAD-DUR# kldstat
Id Refs Address    Size     Name
 1   29 0xc0400000 757368   kernel
 2    1 0xc0b58000 5ad4     snd_cmi.ko
 3    3 0xc0b5e000 574a4    sound.ko
 4    1 0xc0bb6000 4dfa90   nvidia.ko
 5    3 0xc1096000 2eacc    linux.ko
 6    1 0xc4405000 8000     linprocfs.ko
 7    1 0xc4753000 3000     logo_saver.ko
 8    1 0xc4a9b000 4000     umodem.ko

BARAD-DUR# tail -f /var/log/messages
Jun  3 11:10:21 BARAD-DUR kernel: uhub_reattach_port: port 1 reset
failed, error=USB_ERR_TIMEOUT
Jun  3 11:10:21 BARAD-DUR kernel: uhub_reattach_port: device problem
(USB_ERR_TIMEOUT), disabling port 1
Jun  3 11:10:21 BARAD-DUR kernel: ugen0.3: <www.recursion.jp> at usbus0
Jun  3 11:10:21 BARAD-DUR kernel: umodem0: <www.recursion.jp USB-232,
class 2/0, rev 1.10/1.00, addr 3> on usbus0
Jun  3 11:10:21 BARAD-DUR kernel: umodem0: data interface 1, has CM
over data, has no break
Jun  3 11:10:21 BARAD-DUR kernel: device_attach: umodem0 attach returned 6
Jun  3 11:10:21 BARAD-DUR kernel: umodem0: <www.recursion.jp USB-232,
class 2/0, rev 1.10/1.00, addr 3> on usbus0
Jun  3 11:10:21 BARAD-DUR kernel: umodem0: data interface 1, has CM
over data, has no break
Jun  3 11:10:21 BARAD-DUR kernel: device_attach: umodem0 attach returned 6


BARAD-DUR# usbconfig -u 0 -a 3 dump_device_desc dump_curr_config_desc
ugen0.3: <USB-232 www.recursion.jp> at usbus0, cfg=0 md=HOST spd=LOW
(1.5Mbps) pwr=ON

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0110
  bDeviceClass = 0x0002
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0008
  idVendor = 0x16c0
  idProduct = 0x05e1
  bcdDevice = 0x0100
  iManufacturer = 0x0001  <www.recursion.jp>
  iProduct = 0x0002  <USB-232>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001


 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x0043
    bNumInterfaces = 0x0002
    bConfigurationValue = 0x0001
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x0080
    bMaxPower = 0x0032

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0002
      bInterfaceSubClass = 0x0002
      bInterfaceProtocol = 0x0001
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x05
      bDescriptorType = 0x24
      bDescriptorSubType = 0x00
       RAW dump:
       0x00 | 0x05, 0x24, 0x00, 0x10, 0x01


      Additional Descriptor

      bLength = 0x04
      bDescriptorType = 0x24
      bDescriptorSubType = 0x02
       RAW dump:
       0x00 | 0x04, 0x24, 0x02, 0x02


      Additional Descriptor

      bLength = 0x05
      bDescriptorType = 0x24
      bDescriptorSubType = 0x06
       RAW dump:
       0x00 | 0x05, 0x24, 0x06, 0x00, 0x01


      Additional Descriptor

      bLength = 0x05
      bDescriptorType = 0x24
      bDescriptorSubType = 0x01
       RAW dump:
       0x00 | 0x05, 0x24, 0x01, 0x03, 0x01


     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0083  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0008
        bInterval = 0x00ff
        bRefresh = 0x0000
        bSynchAddress = 0x0000


    Interface 1
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0001
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0002
      bInterfaceClass = 0x000a
      bInterfaceSubClass = 0x0000
      bInterfaceProtocol = 0x0000
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0001  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0008
        bInterval = 0x0000
        bRefresh = 0x0000
        bSynchAddress = 0x0000

     Endpoint 1
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0008
        bInterval = 0x0000
        bRefresh = 0x0000
        bSynchAddress = 0x0000



[1] Actually the line is 3062 on current of 2010 Jun 2:
http://fxr.watson.org/fxr/source/dev/usb/usb_transfer.c#L3060

-- 
Marcelo Rossi
"This e-mail is provided "AS IS" with no warranties, and confers no rights."
Received on Thu Jun 03 2010 - 12:22:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:04 UTC