Subject: Re: Possible USB quirk
To: None <lennart@augustsson.net>
From: Brad du Plessis <bradd@cat.co.za>
List: tech-kern
Date: 08/21/2003 17:11:51
I've managed to get this device (MultiTech MTA128ST-USB) to work by doing=
 the=20
following:

In usb_subr.c:

In the function usbd_new_device(..) function call:

err =3D usbd_reload_device_desc(dev);

Now this returns a SHORT_XFER error, but on printing out the contents of =
=20
"dev->ddesc" I found that the idVendor and idProduct where filled in.

I then add the following little routine after usbd_reload_device_desc():

if ((UGETW(dev->ddesc.idProduct) =3D=3D 61953)
=09&&(UGETW(dev->ddesc.idVendor) =3D=3D 1760))
=09{
=09=09dev->ddesc.bMaxPacketSize =3D 8;
=09=09err =3D 0;
=09}

And now its detected ok!

I get the following output when I plug in the device (I've added a few=20
printouts of my own):

usbd_new_device: adding unit addr=3D2, rev=3D110, class=3D2, subclass=3D0=
, protocol=3D0,=20
maxpacket=3D64, len=3D18, speed=3D2
usbd_transfer_cb: short transfer 8<18

Device loaded: dev looks like this:
bLength           =3D 18
bDescriptorType   =3D 1
bcdUSB            =3D 272
bDeviceClass      =3D 2
bDeviceSubClass   =3D 0
bDeviceProtocol   =3D 0
bMaxPacketSize    =3D 64
idVendor          =3D 1760
idProduct         =3D 61953
iManufacturer     =3D 1
iProduct          =3D 2
iSerialNumber     =3D 3
bNumConfigurations=3D 2

umodem0 at uhub0 port 1 configuration 2 interface 0

umodem0: Multi-Tech Systems, Inc. MTA 128ST-USB ISDN Terminal Adapter, re=
v=20
1.10/1.10, addr 2, iclass 2/2
umodem0: data interface 1, has CM over data, has break
umodem0: status change notification available
ucom0 at umodem0


Can this be added as a quirk? Can anyone foresee any problems doing this?

Thanks
 Brad