NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/48715: Please support more USB modems



>Number:         48715
>Category:       kern
>Synopsis:       Please support more USB modems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 06 01:40:00 +0000 2014
>Originator:     Ryo ONODERA
>Release:        NetBSD 6.99.39
>Organization:
        
>Environment:
        
        
System: NetBSD tellurium.elements.tetera.org 6.99.39 NetBSD 6.99.39 (DTRACE2) 
#3: Sun Apr 6 07:55:43 JST 2014 
ryo_on%tellurium.elements.tetera.org@localhost:/usr/obj/amd64/sys/arch/amd64/compile/DTRACE2
 amd64
Architecture: x86_64
Machine: amd64
>Description:
Some USB modems (umodem(4) devices that has non-standard class) do not work
with "no pointer to data interface" message, and they cannot use as modem
as described in
http://mail-index.netbsd.org/current-users/2014/01/20/msg024119.html .

Following patch enable this kind of umodem(4) devices.


Index: umodem.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/umodem.c,v
retrieving revision 1.65
diff -u -r1.65 umodem.c
--- umodem.c    3 Oct 2012 07:07:04 -0000       1.65
+++ umodem.c    6 Apr 2014 01:30:53 -0000
@@ -98,12 +98,17 @@
        usb_interface_descriptor_t *id;
        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 == 
UIPROTO_CDC_AT))
                return (UMATCH_NONE);
 
-       id = usbd_get_interface_descriptor(uaa->iface);
        if (umodem_get_caps(uaa->device, &cm, &acm, id) == -1)
                return (UMATCH_NONE);
 


        
>How-To-Repeat:
Plug cheap USB modem to NetBSD machine.

        
>Fix:
        
See above.

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index