PERFORCE change 174658 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sat Feb 13 16:13:39 UTC 2010


http://p4web.freebsd.org/chv.cgi?CH=174658

Change 174658 by hselasky at hselasky_laptop001 on 2010/02/13 16:13:29

	USB serial:
		- patch from Milan Obuch to add support for new Huawei dongle.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/serial/u3g.c#28 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_msctest.c#16 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_msctest.h#6 edit
.. //depot/projects/usb/src/sys/dev/usb/usbdevs#105 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/serial/u3g.c#28 (text+ko) ====

@@ -92,6 +92,7 @@
 #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_HUAWEI_E1752	9	/* Requires Huawei E1752 init command */
 
 enum {
 	U3G_BULK_WR,
@@ -281,6 +282,7 @@
 	U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI),
 	U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI),
 	U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI),
+	U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEI_E1752),
 	U3G_DEV(KYOCERA2, CDMA_MSM_K, 0),
 	U3G_DEV(KYOCERA2, KPC680, 0),
 	U3G_DEV(MERLIN, V620, 0),
@@ -667,6 +669,9 @@
 			/* Just pretend we ejected, the card will timeout */
 			error = 0;
 			break;
+		case U3GINIT_HUAWEI_E1752:
+			error = usb_msc_eject(udev, 0, MSC_EJECT_E1752);
+			break;
 		default:
 			/* no 3G eject quirks */
 			error = EOPNOTSUPP;

==== //depot/projects/usb/src/sys/dev/usb/usb_msctest.c#16 (text+ko) ====

@@ -94,6 +94,9 @@
 					  0x01, 0x01, 0x01, 0x01, 0x00, 0x00 };
 static uint8_t scsi_cmotech_eject[] =   { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43,
 					  0x48, 0x47 };
+static uint8_t scsi_huawei1752_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 @@
 		    &scsi_cmotech_eject, sizeof(scsi_cmotech_eject),
 		    USB_MS_HZ);
 		break;
+	case MSC_EJECT_E1752:
+		err = bbb_command_start(sc, DIR_IN, 0, NULL, 0,
+		    &scsi_huawei1752_eject, sizeof(scsi_huawei1752_eject),
+		    USB_MS_HZ);
+		break;
 	default:
 		printf("usb_msc_eject: unknown eject method (%d)\n", method);
 		break;

==== //depot/projects/usb/src/sys/dev/usb/usb_msctest.h#6 (text+ko) ====

@@ -31,7 +31,8 @@
 	MSC_EJECT_STOPUNIT,
 	MSC_EJECT_REZERO,
 	MSC_EJECT_ZTESTOR,
-	MSC_EJECT_CMOTECH
+	MSC_EJECT_CMOTECH,
+	MSC_EJECT_E1752,
 };
 
 int usb_iface_is_cdrom(struct usb_device *udev,

==== //depot/projects/usb/src/sys/dev/usb/usbdevs#105 (text+ko) ====

@@ -1724,6 +1724,7 @@
 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 p4-projects mailing list