From owner-svn-src-all@FreeBSD.ORG Sun Feb 14 20:05:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 780F11065696; Sun, 14 Feb 2010 20:05:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 676E68FC16; Sun, 14 Feb 2010 20:05:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1EK5C8J072256; Sun, 14 Feb 2010 20:05:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1EK5Ctj072251; Sun, 14 Feb 2010 20:05:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201002142005.o1EK5Ctj072251@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Feb 2010 20:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203905 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2010 20:05:12 -0000 Author: thompsa Date: Sun Feb 14 20:05:12 2010 New Revision: 203905 URL: http://svn.freebsd.org/changeset/base/203905 Log: Add support for the E1752 3G modem and the required eject command. Submitted by: Milan Obuch Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_msctest.h head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/serial/u3g.c Sun Feb 14 20:05:12 2010 (r203905) @@ -92,6 +92,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3GINIT_CMOTECH 6 /* Requires CMOTECH SCSI command */ #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 */ enum { U3G_BULK_WR, @@ -281,6 +282,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(MERLIN, V620, 0), @@ -649,6 +651,9 @@ u3g_test_autoinst(void *arg, struct usb_ case U3GINIT_HUAWEI: error = u3g_huawei_init(udev); break; + case U3GINIT_HUAWEISCSI: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/usb_msctest.c Sun Feb 14 20:05:12 2010 (r203905) @@ -94,6 +94,9 @@ static uint8_t scsi_ztestor_eject[] = 0x01, 0x01, 0x01, 0x01, 0x00, 0x00 }; static uint8_t scsi_cmotech_eject[] = { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43, 0x48, 0x47 }; +static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -611,6 +614,11 @@ usb_msc_eject(struct usb_device *udev, u &scsi_cmotech_eject, sizeof(scsi_cmotech_eject), USB_MS_HZ); break; + case MSC_EJECT_HUAWEI: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_huawei_eject, sizeof(scsi_huawei_eject), + USB_MS_HZ); + break; default: printf("usb_msc_eject: unknown eject method (%d)\n", method); break; Modified: head/sys/dev/usb/usb_msctest.h ============================================================================== --- head/sys/dev/usb/usb_msctest.h Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/usb_msctest.h Sun Feb 14 20:05:12 2010 (r203905) @@ -31,7 +31,8 @@ enum { MSC_EJECT_STOPUNIT, MSC_EJECT_REZERO, MSC_EJECT_ZTESTOR, - MSC_EJECT_CMOTECH + MSC_EJECT_CMOTECH, + MSC_EJECT_HUAWEI, }; int usb_iface_is_cdrom(struct usb_device *udev, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Feb 14 20:00:21 2010 (r203904) +++ head/sys/dev/usb/usbdevs Sun Feb 14 20:05:12 2010 (r203905) @@ -1723,6 +1723,7 @@ product HUAWEI E143C 0x143c 3G modem product HUAWEI E143D 0x143d 3G modem product HUAWEI E143E 0x143e 3G modem product HUAWEI E143F 0x143f 3G modem +product HUAWEI E1752 0x1446 3G modem product HUAWEI E14AC 0x14ac 3G modem /* HUAWEI 3com products */