Subject: kern/11428: umodem.c always issues optional Set_Comm_Feature.
To: None <>
From: Ryutaroh Matsumoto <>
List: netbsd-bugs
Date: 11/05/2000 21:08:10
>Number:         11428
>Category:       kern
>Synopsis:       umodem.c always issues optional Set_Comm_Feature, which prevents a USB modem from attached.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 05 21:08:00 PST 2000
>Originator:     Ryutaroh Matsumoto
>Release:        NetBSD-1.5_BETA
Tokyo Institute of Technology, Japan
System: NetBSD pear 1.5_BETA NetBSD 1.5_BETA (PEAR) #1: Mon Nov 6 13:16:47 JST 2000 root@pear:/usr/src/sys/arch/i386/compile/PEAR i386

The USB Communication Device Class specification ver. 1.1 specifies that
Set_Comm_Feature request is optional (in page 17), and whether the device
accepts Set_Comm_Feature is indicated in the variable sc->sc_acm_cap
in dev/usb/umodem.c.
But umodem.c always issues Set_Comm_Feature without checking sc->sc_acm_cap,
and does not attach a USB modem if an error is returned by Set_Comm_Feature
This behavior prevents a USB CDC ACM compliant modem from attached.

Connect a USB CDC ACM compliant modem that does not accept Set_Comm_Feature
to a NetBSD box, and boot it.

Apply the following patch.

--- sys/dev/usb/	Tue Oct 17 08:56:06 2000
+++ sys/dev/usb/umodem.c	Mon Nov  6 13:16:18 2000
@@ -259,8 +259,11 @@
 	if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
-		err = umodem_set_comm_feature(sc, UCDC_ABSTRACT_STATE,
+		if (sc->sc_acm_cap & USB_CDC_ACM_HAS_FEATURE)
+			err = umodem_set_comm_feature(sc, UCDC_ABSTRACT_STATE,
+		else
+			err = 0;
 		if (err) {
 			printf("%s: could not set data multiplex mode\n",