From owner-freebsd-usb@FreeBSD.ORG Sat Dec 15 14:07:26 2007 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F5B816A421 for ; Sat, 15 Dec 2007 14:07:26 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.swipnet.se [212.247.155.1]) by mx1.freebsd.org (Postfix) with ESMTP id B267113C459 for ; Sat, 15 Dec 2007 14:07:25 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe09.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 561794110; Sat, 15 Dec 2007 14:07:22 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 15 Dec 2007 14:07:59 +0100 User-Agent: KMail/1.9.7 References: <20071215125514.GA33989@k7.mavetju> In-Reply-To: <20071215125514.GA33989@k7.mavetju> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712151408.00440.hselasky@c2i.net> Cc: Edwin Groothuis Subject: Re: Huawei E220 USB modem 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: Sat, 15 Dec 2007 14:07:26 -0000 On Saturday 15 December 2007, Edwin Groothuis wrote: > On Fri, Dec 14, 2007 at 09:11:31PM +1100, Edwin Groothuis wrote: > > On Fri, Dec 14, 2007 at 03:35:36PM +1100, Edwin Groothuis wrote: > > > > > > See http://www.mavetju.org/weblog/html/00192.html for a full write-up. > > > > See http://www.freebsd.org/cgi/query-pr.cgi?pr=118686 for a PR to > > get it in the system. > > Believe it or not, but that "I need to take it out and in again" > annoyed the hell out of me. Specially after seeing that this program: > > > http://lists.freebsd.org/pipermail/freebsd-questions/2007-December/164404.h >tml > > with the parameters: "/dev/usb0 2" caused the modem to be detected > without a problem. I admit it still threw an error according to the > program, but the logfiles showed that the modem was there. And > working. > > In ubsa.c that must be: > > --- ubsa.c.orig Sat Dec 15 22:36:22 2007 > +++ ubsa.c Sat Dec 15 23:39:07 2007 > @@ -383,6 +383,23 @@ > printf("%s: Could not find interrupt in\n", > USBDEVNAME(ucom->sc_dev)); > ucom->sc_dying = 1; > + > + if (uaa->vendor == USB_VENDOR_HUAWEI && > + uaa->product == USB_PRODUCT_HUAWEI_E220) { > + > + usb_device_request_t req; > + usbd_status err; > + > + req.bmRequestType = UT_WRITE;; > + req.bRequest = UR_SET_FEATURE; > + USETW(req.wValue, 1); > + USETW(req.wIndex, 2); > + USETW(req.wLength, 0); > + printf("Resetting port\n"); > + err = usbd_do_request(dev, &req, 0); > + printf("Port resetted\n"); > + } > + > goto error; > } > > > I admit that this is not the worlds best option, because it gives > this in the kernel: Hi, Did you add your latest patch to the PR system ? --HPS