From owner-freebsd-usb@FreeBSD.ORG Mon Oct 4 16:16:31 2010 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 70FC01065674 for ; Mon, 4 Oct 2010 16:16:31 +0000 (UTC) (envelope-from mike.barnardq@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 21E8C8FC0A for ; Mon, 4 Oct 2010 16:16:30 +0000 (UTC) Received: by qwd6 with SMTP id 6so3831739qwd.13 for ; Mon, 04 Oct 2010 09:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=/OxeOJ/qprH34qZMmSxeNm54Xko6ebIGFMePc6AlB+E=; b=CvxSjrSXrtjLLD5hjJ4wUorRQdN4slo8+eQMs04bbT7bhyXwKze619KXNNwzfSFPp0 xLTQqBEViqC7+xD7ciUQ/x7dDC1qkbkl964V4n20dS3oZCChYVBpMwjhhgWIrcm0Gu18 5rvy9gXwGbg/nc3M+GvqcAG6Jf6KFY5kW0zmM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Y/4xod3q3bWOIqlhRuURL5SwDG+KyNUI5uSB1VDcI6Sp28wpB8nqVY9jxEjjBaald0 2GtSu+xKE6eA9y243GxNc6lG7wCIVawaI+Tr2hvEZaumjc8bbnx8cgwtWm3hERknurFo /gzUDGIQicKs5wBsdGmkKxQM4T4MCXkJdCnoU= MIME-Version: 1.0 Received: by 10.224.67.193 with SMTP id s1mr7104474qai.28.1286208989509; Mon, 04 Oct 2010 09:16:29 -0700 (PDT) Received: by 10.229.34.17 with HTTP; Mon, 4 Oct 2010 09:16:29 -0700 (PDT) In-Reply-To: <201010041223.25628.hselasky@c2i.net> References: <201010041223.25628.hselasky@c2i.net> Date: Mon, 4 Oct 2010 19:16:29 +0300 Message-ID: From: Mike Barnard To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-usb@freebsd.org Subject: Re: Alcatel X220L 3G 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: Mon, 04 Oct 2010 16:16:31 -0000 On Mon, Oct 4, 2010 at 1:23 PM, Hans Petter Selasky wrote: > On Monday 04 October 2010 10:52:06 Mike Barnard wrote: > > Hi, > > > > I have myself an Alcatel X220L HSPA modem that is not detected under > > FreeBSD 8.1-RC1. When plugged in, get this: > > Look at the u3g driver. Maybe you need to add the idVendor and idProduct > there, and an autoinstall quirk. > > I have patched up u3g.c and usbdevs and I get the same dump as in my first email when I plug in the device. root@trinity# diff -u usbdevs.original usbdevs --- usbdevs.original 2010-06-14 17:00:13.000000000 +0300 +++ usbdevs 2010-10-04 18:22:53.000000000 +0300 @@ -576,6 +576,7 @@ vendor SIEMENS3 0x11f5 Siemens vendor PROLIFIC2 0x11f6 Prolific vendor ALCATEL 0x11f7 Alcatel +vendor ALCATEL3G 0x1bbb Alcatel USBModem vendor UNKNOWN3 0x1233 Unknown vendor vendor TSUNAMI 0x1241 Tsunami vendor PHEENET 0x124a Pheenet @@ -876,6 +877,9 @@ /* AKS products */ product AKS USBHASP 0x0001 USB-HASP 0.06 +/* Alcatel Lucent Products */ +product ALCATEL X220L 0xf000 HSPA Modem + /* Alcor Micro, Inc. products */ product ALCOR2 KBD_HUB 0x2802 Kbd Hub and u3g diffs look like this: root@trinity# diff -u u3g.c.original u3g.c --- u3g.c.original 2010-06-14 17:00:12.000000000 +0300 +++ u3g.c 2010-10-04 19:13:44.000000000 +0300 @@ -93,6 +93,7 @@ #define U3GINIT_WAIT 7 /* Device reappears after a delay */ #define U3GINIT_SAEL_M460 8 /* Requires vendor init */ #define U3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ +#define U3GINIT_ALCATEL 10 /* Requires Alcatel init command */ enum { U3G_BULK_WR, @@ -184,6 +185,7 @@ U3G_DEV(ACERP, H10, 0), U3G_DEV(AIRPLUS, MCD650, 0), U3G_DEV(AIRPRIME, PC5220, 0), + U3G_DEV(ALCATEL, X220L, U3GINIT_ALCATEL), U3G_DEV(ALINK, 3G, 0), U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), @@ -542,6 +544,24 @@ return (0); } +static int +u3g_alcatel_init(struct usb_device *udev) +{ + struct usb_device_request req; + + req.bmRequestType = UT_WRITE_DEVICE; + req.bRequest = UR_SET_FEATURE; + USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP); + USETW(req.wIndex, UHF_PORT_SUSPEND); + USETW(req.wLength, 0); + + if (usbd_do_request_flags(udev, NULL, &req, + NULL, 0, NULL, USB_MS_HZ)) { + /* ignore any errors */ + } + return (0); +} + static void u3g_sael_m460_init(struct usb_device *udev) { @@ -655,6 +675,12 @@ case U3GINIT_HUAWEISCSI: error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI); break; + case U3GINIT_ALCATEL: + error = u3g_alcatel_init(udev); + break; + case U3GINIT_ALCATELSCSI: + error = usb_msc_eject(udev, 0, MSC_EJECT_ALCATEL); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; I may have done something wrong... any pointers are most welcome -- Mike Of course, you might discount this possibility, but remember that one in a million chances happen 99% of the time. ------------------------------------------------------------