Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Don't try to set CM_OVER_DATA feature if feature...



details:   https://anonhg.NetBSD.org/src/rev/539f8731742e
branches:  trunk
changeset: 499078:539f8731742e
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Nov 10 14:08:32 2000 +0000

description:
Don't try to set CM_OVER_DATA feature if features cannot be set.
>From Ryutaroh MATSUMOTO <ryutaroh%ss.titech.ac.jp@localhost> in PR # 11428.

diffstat:

 sys/dev/usb/umodem.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r eaf658ab9c38 -r 539f8731742e sys/dev/usb/umodem.c
--- a/sys/dev/usb/umodem.c      Fri Nov 10 13:53:23 2000 +0000
+++ b/sys/dev/usb/umodem.c      Fri Nov 10 14:08:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umodem.c,v 1.32 2000/11/10 13:53:23 augustss Exp $     */
+/*     $NetBSD: umodem.c,v 1.33 2000/11/10 14:08:32 augustss Exp $     */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -262,8 +262,11 @@
                sc->sc_cm_over_data = 1;
        } else {
                if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
-                       err = umodem_set_comm_feature(sc, UCDC_ABSTRACT_STATE,
-                                                     UCDC_DATA_MULTIPLEXED);
+                       if (sc->sc_acm_cap & USB_CDC_ACM_HAS_FEATURE)
+                               err = umodem_set_comm_feature(sc,
+                                   UCDC_ABSTRACT_STATE, UCDC_DATA_MULTIPLEXED);
+                       else
+                               err = 0;
                        if (err) {
                                printf("%s: could not set data multiplex mode\n",
                                       USBDEVNAME(sc->sc_dev));



Home | Main Index | Thread Index | Old Index