[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: umodem(4) with "no pointer to data interface"
From: Brett Lymn <blymn%internode.on.net@localhost>, Date: Sun, 26 Jan 2014
> On Thu, Jan 23, 2014 at 08:09:03PM +1030, Brett Lymn wrote:
>> Yes, I agree that is probably not a wise thing to assume. I think we
>> should iterate over all the interfaces looking for a data interface if
>> it is not a union with the control interface. If you don't beat me to
>> it I will try to get a patch done in the next day or so.
> OK, try the attached patches, I have added a quirk to usb_quirks.c (I
> assume that you must have modified your usbdevs because I don't have
> connexant in mine so I can't compile test...) and added code to
> umodem_common.c so it will search for a data interface when it is not in
> a union. See how that goes.
Thanks for your code.
However your code does not work for my USB modem.
dmesg is here. Only control interface is detected.
umodem0 at uhub2 port 1 configuration 1 interface 0
umodem0: Conexant USB Modem, rev 1.10/1.00, addr 3, iclass 2/2
umodem0: data interface 0, has no CM over data, has no break
umodem0: Could not find data bulk in
And diff for usb_quirks.c is not used.
By the way, for blute-forcing interface, such mechanism would be
implemented in umodem_match function.
How about this code?
--- src/sys/dev/usb/umodem.c.orig 2014-01-22 06:52:29.000000000 +0000
@@ -98,12 +98,17 @@ umodem_match(device_t parent, cfdata_t m
int cm, acm;
+ id = usbd_get_interface_descriptor(uaa->iface);
+ if (uaa->subclass != UISUBCLASS_ABSTRACT_CONTROL_MODEL &&
+ (id->bInterfaceClass == UICLASS_CDC_DATA &&
+ id->bInterfaceSubClass == UISUBCLASS_DATA))
+ return (UMATCH_IFACECLASS_IFACESUBCLASS);
if (uaa->class != UICLASS_CDC ||
uaa->subclass != UISUBCLASS_ABSTRACT_CONTROL_MODEL ||
!(uaa->proto == UIPROTO_CDC_NOCLASS || uaa->proto ==
- id = usbd_get_interface_descriptor(uaa->iface);
if (umodem_get_caps(uaa->device, &cm, &acm, id) == -1)
Resulting dmesg is here.
umodem0 at uhub2 port 1 configuration 1 interface 1
umodem0: Conexant USB Modem, rev 1.10/1.00, addr 10, iclass 10/0
umodem0: data interface 1, has CM over data, has break
ucom1 at umodem0
Functionality is not tested yet, but it should work.
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Main Index |
Thread Index |