From owner-freebsd-usb@FreeBSD.ORG Thu May 31 07:04:54 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDB2316A46D; Thu, 31 May 2007 07:04:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 918ED13C457; Thu, 31 May 2007 07:04:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l4V74J6s059191; Thu, 31 May 2007 01:04:19 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 31 May 2007 01:04:36 -0600 (MDT) Message-Id: <20070531.010436.-460543608.imp@bsdimp.com> To: quetzal@zone3000.net From: "M. Warner Losh" In-Reply-To: <20070531054845.GA22380@zone3000.net> References: <20070528093944.GA12606@zone3000.net> <20070531054845.GA22380@zone3000.net> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 31 May 2007 01:04:19 -0600 (MDT) Cc: freebsd-usb@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: ucom0: could not set data multiplex mode X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2007 07:04:55 -0000 In message: <20070531054845.GA22380@zone3000.net> Nikolay Pavlov writes: : On Monday, 28 May 2007 at 12:39:44 +0300, Nikolay Pavlov wrote: : > Hi folks. : > I have an issue with CCU-550 CDMA modem : > (http://www.cmotech.com/eproduct6-1.htm) on recent current. : > Every time i am reattaching it i see this error: : > ucom0: could not set data multiplex mode : > : > So in order to work with it i have to reboot after each detache : > procedure. The only known workaround for this is to delete the : > "goto bad;" code in /usr/src/sys/dev/usb/umodem.c: : > : > printf("%s: could not set data multiplex mode\n", : > devname); : > goto bad; : > : > Could someone comment on this? : > : > P.S. Please cc me, becuase i am not subscribe to freebsd-usb or : > freebsd-mobile : > : : May be i should send this to maintainer..? I thought that NetBSD did something clever in this condition, but it doesn't. Try adding the device to usb_quirks.c. You'll need an entry like the following: { USB_VENDOR_METRICOM, USB_PRODUCT_METRICOM_RICOCHET_GS, 0x100, { UQ_ASSUME_CM_OVER_DATA }}, for whatever values your CCU-550 CDMA modem has. alternatively, you could try the following patch, which may be lame: Index: umodem.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/umodem.c,v retrieving revision 1.60 diff -u -r1.60 umodem.c --- umodem.c 7 Sep 2006 00:06:42 -0000 1.60 +++ umodem.c 31 May 2007 07:03:49 -0000 @@ -279,7 +279,6 @@ usb_cdc_cm_descriptor_t *cmd; char *devinfo = NULL; const char *devname; - usbd_status err; int data_ifcno; int i; struct ucom_softc *ucom; @@ -373,16 +372,8 @@ } else { if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) { 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", - devname); - goto bad; - } - sc->sc_cm_over_data = 1; + umodem_set_comm_feature(sc, + UCDC_ABSTRACT_STATE, UCDC_DATA_MULTIPLEXED); sc->sc_cm_over_data = 1; } } this patch just feels wrong to me, but I suspect it will just work. Warner