Date: Wed, 6 Jun 2007 12:15:28 +0300 From: Nikolay Pavlov <quetzal@zone3000.net> To: "M. Warner Losh" <imp@bsdimp.com>, R.Mahmatkhanov@SKYLINK.RU Cc: freebsd-usb@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: ucom0: could not set data multiplex mode Message-ID: <20070606091528.GA44081@zone3000.net> In-Reply-To: <20070602.131011.-1370572280.imp@bsdimp.com> References: <20070531054845.GA22380@zone3000.net> <20070531.010436.-460543608.imp@bsdimp.com> <20070602122453.GA48237@zone3000.net> <20070602.131011.-1370572280.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, 2 June 2007 at 13:10:11 -0600, M. Warner Losh wrote: > In message: <20070602122453.GA48237@zone3000.net> > Nikolay Pavlov <quetzal@zone3000.net> writes: > : On Thursday, 31 May 2007 at 1:04:36 -0600, M. Warner Losh wrote: > : > In message: <20070531054845.GA22380@zone3000.net> > : > Nikolay Pavlov <quetzal@zone3000.net> 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 }}, > : > : Thanks for response Warner. I want to check the usb_quirks variant > : first. Could you please advise me on what this line should be if i have > : this on dmesg: > : > : ucom0: <CMOTECH CO., LTD. CMOTECH CDMA Technologies, class 2/0, rev 2.00/0.00, addr 2> on uhub1 > : ucom0: CMOTECH CO., LTD. CMOTECH CDMA Technologies, rev 2.00/0.00, addr 2, iclass 2/2 > : ucom0: data interface 1, has CM over data, has break > : ucom0: status change notification available > > Unfortunately, there's not enough info there. > > usbdevs -v > > will tell us. Hi Warner and Ruslan. Warner i have found that Ruslan is the originator of the patches for umodem.c: http://www.freebsd.org/cgi/query-pr.cgi?pr=109838 So there is already a few CMOTECH devices there. In any case guys here is my "usbdevs -v" output: Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: full speed, power 100 mA, config 1, CMOTECH CDMA Technologies(0x5533), CMOTECH CO., LTD.(0x16d8), rev 0.00 port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb4: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 powered port 5 powered port 6 powered port 7 powered I am open to any test ;) > > : > 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. > > Please try this patch too :-) > > Warner -- ====================================================================== - Best regards, Nikolay Pavlov. <<<----------------------------------- ======================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070606091528.GA44081>