svn commit: r206306 - in stable/8/sys/dev/usb: . serial
Andrew Thompson
thompsa at FreeBSD.org
Tue Apr 6 23:22:47 UTC 2010
Author: thompsa
Date: Tue Apr 6 23:22:47 2010
New Revision: 206306
URL: http://svn.freebsd.org/changeset/base/206306
Log:
MFC r203905
Add support for the E1752 3G modem and the required eject command.
Submitted by: Milan Obuch
Modified:
stable/8/sys/dev/usb/serial/u3g.c
stable/8/sys/dev/usb/usb_msctest.c
stable/8/sys/dev/usb/usb_msctest.h
stable/8/sys/dev/usb/usbdevs
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/dev/usb/serial/u3g.c
==============================================================================
--- stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:22:19 2010 (r206305)
+++ stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:22:47 2010 (r206306)
@@ -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: stable/8/sys/dev/usb/usb_msctest.c
==============================================================================
--- stable/8/sys/dev/usb/usb_msctest.c Tue Apr 6 23:22:19 2010 (r206305)
+++ stable/8/sys/dev/usb/usb_msctest.c Tue Apr 6 23:22:47 2010 (r206306)
@@ -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: stable/8/sys/dev/usb/usb_msctest.h
==============================================================================
--- stable/8/sys/dev/usb/usb_msctest.h Tue Apr 6 23:22:19 2010 (r206305)
+++ stable/8/sys/dev/usb/usb_msctest.h Tue Apr 6 23:22:47 2010 (r206306)
@@ -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: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:22:19 2010 (r206305)
+++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:22:47 2010 (r206306)
@@ -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 */
More information about the svn-src-stable-8
mailing list