View | Details | Raw Unified | Return to bug 192345 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/src/sys/dev/usb/net/if_cdce.c (+9 lines)
Lines 277-282 Link Here
277
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
277
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
278
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
278
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
279
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
279
	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
280
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
281
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
282
		USB_IFACE_PROTOCOL(0x16), USB_DRIVER_INFO(0)},
283
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
284
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
285
		USB_IFACE_PROTOCOL(0x46), USB_DRIVER_INFO(0)},
286
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
287
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
288
		USB_IFACE_PROTOCOL(0x76), USB_DRIVER_INFO(0)},
280
};
289
};
281
290
282
static const STRUCT_USB_DUAL_ID cdce_dual_devs[] = {
291
static const STRUCT_USB_DUAL_ID cdce_dual_devs[] = {
(-)/usr/src/sys/dev/usb/serial/u3g.c (-8 / +19 lines)
Lines 76-89 Link Here
76
#define	U3G_CONFIG_INDEX	0
76
#define	U3G_CONFIG_INDEX	0
77
#define	U3G_BSIZE		2048
77
#define	U3G_BSIZE		2048
78
78
79
#define	U3GSP_GPRS		0
80
#define	U3GSP_EDGE		1
81
#define	U3GSP_CDMA		2
82
#define	U3GSP_UMTS		3
83
#define	U3GSP_HSDPA		4
84
#define	U3GSP_HSUPA		5
85
#define	U3GSP_HSPA		6
86
#define	U3GSP_MAX		7
87
79
88
/* Eject methods; See also usb_quirks.h:UQ_MSC_EJECT_* */
80
/* Eject methods; See also usb_quirks.h:UQ_MSC_EJECT_* */
89
#define	U3GINIT_HUAWEI		1	/* Requires Huawei init command */
81
#define	U3GINIT_HUAWEI		1	/* Requires Huawei init command */
Lines 327-332 Link Here
327
	U3G_DEV(HUAWEI, K4505, U3GINIT_HUAWEI),
319
	U3G_DEV(HUAWEI, K4505, U3GINIT_HUAWEI),
328
	U3G_DEV(HUAWEI, K4505_INIT, U3GINIT_HUAWEISCSI),
320
	U3G_DEV(HUAWEI, K4505_INIT, U3GINIT_HUAWEISCSI),
329
	U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI),
321
	U3G_DEV(HUAWEI, ETS2055, U3GINIT_HUAWEI),
322
	U3G_DEV(HUAWEI, E3272_INIT, U3GINIT_HUAWEISCSI),
323
	U3G_DEV(HUAWEI, E3272, 0),
330
	U3G_DEV(KYOCERA2, CDMA_MSM_K, 0),
324
	U3G_DEV(KYOCERA2, CDMA_MSM_K, 0),
331
	U3G_DEV(KYOCERA2, KPC680, 0),
325
	U3G_DEV(KYOCERA2, KPC680, 0),
332
	U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI),
326
	U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI),
Lines 345-350 Link Here
345
	U3G_DEV(NOVATEL, MC547, 0),
339
	U3G_DEV(NOVATEL, MC547, 0),
346
	U3G_DEV(NOVATEL, MC679, 0),
340
	U3G_DEV(NOVATEL, MC679, 0),
347
	U3G_DEV(NOVATEL, MC950D, 0),
341
	U3G_DEV(NOVATEL, MC950D, 0),
342
	U3G_DEV(NOVATEL, MC990D, 0),
348
	U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT),
343
	U3G_DEV(NOVATEL, MIFI2200, U3GINIT_SCSIEJECT),
349
	U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT),
344
	U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT),
350
	U3G_DEV(NOVATEL, U720, 0),
345
	U3G_DEV(NOVATEL, U720, 0),
Lines 607-612 Link Here
607
	return (0);
602
	return (0);
608
}
603
}
609
604
605
/* Huawei specific: see if_cdce.c for more ids. */
606
#define U3G_HUAWEI_IS_CDC(info, iface_descr)					\
607
	((info)->idVendor == USB_VENDOR_HUAWEI &&				\
608
	(iface_descr)->bInterfaceSubClass == UISUBCLASS_ABSTRACT_CONTROL_MODEL && \
609
	((iface_descr)->bInterfaceProtocol == 0x16 ||				\
610
	(iface_descr)->bInterfaceProtocol == 0x46 ||				\
611
	(iface_descr)->bInterfaceProtocol == 0x76))
612
613
610
static void
614
static void
611
u3g_sael_m460_init(struct usb_device *udev)
615
u3g_sael_m460_init(struct usb_device *udev)
612
{
616
{
Lines 814-819 Link Here
814
	if (uaa->info.bInterfaceClass != UICLASS_VENDOR) {
818
	if (uaa->info.bInterfaceClass != UICLASS_VENDOR) {
815
		return (ENXIO);
819
		return (ENXIO);
816
	}
820
	}
821
	/* Huawei specific: skeep cdce devices. */
822
	if (U3G_HUAWEI_IS_CDC(&uaa->info, &uaa->info)) {
823
		return (ENXIO);
824
	}
817
	return (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa));
825
	return (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa));
818
}
826
}
819
827
Lines 857-862 Link Here
857
		id = usbd_get_interface_descriptor(iface);
865
		id = usbd_get_interface_descriptor(iface);
858
		if (id == NULL || id->bInterfaceClass != UICLASS_VENDOR)
866
		if (id == NULL || id->bInterfaceClass != UICLASS_VENDOR)
859
			continue;
867
			continue;
868
		/* Huawei specific: skeep cdce devices. */
869
		if (U3G_HUAWEI_IS_CDC(&uaa->info, id))
870
			continue;
860
		usbd_set_parent_iface(uaa->device, i, uaa->info.bIfaceIndex);
871
		usbd_set_parent_iface(uaa->device, i, uaa->info.bIfaceIndex);
861
		iface_valid |= (1<<i);
872
		iface_valid |= (1<<i);
862
	}
873
	}
(-)/usr/src/sys/dev/usb/serial/umodem.c (+18 lines)
Lines 122-127 Link Here
122
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
122
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
123
		USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)},
123
		USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)},
124
	/* Huawei Modem class match */
124
	/* Huawei Modem class match */
125
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
126
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
127
		USB_IFACE_PROTOCOL(0x01)},
128
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
129
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
130
		USB_IFACE_PROTOCOL(0x02)},
131
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
132
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
133
		USB_IFACE_PROTOCOL(0x10)},
134
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
135
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
136
		USB_IFACE_PROTOCOL(0x12)},
137
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
138
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
139
		USB_IFACE_PROTOCOL(0x61)},
140
	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
141
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
142
		USB_IFACE_PROTOCOL(0x62)},
125
	{USB_IFACE_CLASS(UICLASS_CDC),
143
	{USB_IFACE_CLASS(UICLASS_CDC),
126
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
144
		USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
127
		USB_IFACE_PROTOCOL(0xFF)},
145
		USB_IFACE_PROTOCOL(0xFF)},
(-)/usr/src/sys/dev/usb/usb_msctest.c (-4 / +8 lines)
Lines 99-106 Link Here
99
					  0x01, 0x01, 0x01, 0x01, 0x00, 0x00 };
99
					  0x01, 0x01, 0x01, 0x01, 0x00, 0x00 };
100
static uint8_t scsi_cmotech_eject[] =   { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43,
100
static uint8_t scsi_cmotech_eject[] =   { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43,
101
					  0x48, 0x47 };
101
					  0x48, 0x47 };
102
static uint8_t scsi_huawei_eject[] =	{ 0x11, 0x06, 0x00, 0x00, 0x00, 0x00,
102
static uint8_t scsi_huawei_eject[] =	{ 0x11, 0x06, 0x20, 0x00, 0x00, 0x01,
103
					  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
103
					  0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
104
					  0x00, 0x00, 0x00, 0x00 };
104
					  0x00, 0x00, 0x00, 0x00 };
105
static uint8_t scsi_tct_eject[] =	{ 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 };
105
static uint8_t scsi_tct_eject[] =	{ 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 };
106
static uint8_t scsi_sync_cache[] =	{ 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
106
static uint8_t scsi_sync_cache[] =	{ 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
Lines 482-487 Link Here
482
	sc->data_timeout = (data_timeout + USB_MS_HZ);
482
	sc->data_timeout = (data_timeout + USB_MS_HZ);
483
	sc->actlen = 0;
483
	sc->actlen = 0;
484
	sc->cmd_len = cmd_len;
484
	sc->cmd_len = cmd_len;
485
	sc->error = 0;
485
	memset(&sc->cbw->CBWCDB, 0, sizeof(sc->cbw->CBWCDB));
486
	memset(&sc->cbw->CBWCDB, 0, sizeof(sc->cbw->CBWCDB));
486
	memcpy(&sc->cbw->CBWCDB, cmd_ptr, cmd_len);
487
	memcpy(&sc->cbw->CBWCDB, cmd_ptr, cmd_len);
487
	DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw->CBWCDB, ":");
488
	DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw->CBWCDB, ":");
Lines 843-853 Link Here
843
		break;
844
		break;
844
	default:
845
	default:
845
		DPRINTF("Unknown eject method (%d)\n", method);
846
		DPRINTF("Unknown eject method (%d)\n", method);
846
		err = 0;
847
		err = USB_ERR_INVAL;
847
		break;
848
		break;
848
	}
849
	}
850
	/* Supress error. */
851
	if (err == USB_ERR_STALLED)
852
		err = 0;
849
	DPRINTF("Eject CD command status: %s\n", usbd_errstr(err));
853
	DPRINTF("Eject CD command status: %s\n", usbd_errstr(err));
850
854
851
	bbb_detach(sc);
855
	bbb_detach(sc);
852
	return (0);
856
	return (err);
853
}
857
}
(-)/usr/src/sys/dev/usb/usbdevs (+3 lines)
Lines 2341-2349 Link Here
2341
product HUAWEI E3131		0x1506	3G modem
2341
product HUAWEI E3131		0x1506	3G modem
2342
product HUAWEI K3765_INIT	0x1520	K3765 Initial
2342
product HUAWEI K3765_INIT	0x1520	K3765 Initial
2343
product HUAWEI K4505_INIT	0x1521	K4505 Initial
2343
product HUAWEI K4505_INIT	0x1521	K4505 Initial
2344
product HUAWEI E3272_INIT	0x155b	LTE modem initial
2344
product HUAWEI ETS2055		0x1803	CDMA modem
2345
product HUAWEI ETS2055		0x1803	CDMA modem
2345
product HUAWEI E173		0x1c05	3G modem
2346
product HUAWEI E173		0x1c05	3G modem
2346
product HUAWEI E173_INIT	0x1c0b	3G modem initial
2347
product HUAWEI E173_INIT	0x1c0b	3G modem initial
2348
product HUAWEI E3272		0x1c1e	LTE modem
2347
2349
2348
/* HUAWEI 3com products */
2350
/* HUAWEI 3com products */
2349
product HUAWEI3COM WUB320G	0x0009	Aolynk WUB320g
2351
product HUAWEI3COM WUB320G	0x0009	Aolynk WUB320g
Lines 3237-3242 Link Here
3237
product NOVATEL U727_2		0x5100	Merlin U727 CDMA
3239
product NOVATEL U727_2		0x5100	Merlin U727 CDMA
3238
product NOVATEL U760		0x6000	Novatel U760
3240
product NOVATEL U760		0x6000	Novatel U760
3239
product NOVATEL MC760		0x6002	Novatel MC760
3241
product NOVATEL MC760		0x6002	Novatel MC760
3242
product NOVATEL MC990D		0x7001	Novatel MC990D
3240
product NOVATEL MC547		0x7042	Novatel MC547
3243
product NOVATEL MC547		0x7042	Novatel MC547
3241
product NOVATEL MC679		0x7031	Novatel MC679
3244
product NOVATEL MC679		0x7031	Novatel MC679
3242
product NOVATEL2 FLEXPACKGPS	0x0100	NovAtel FlexPack GPS receiver
3245
product NOVATEL2 FLEXPACKGPS	0x0100	NovAtel FlexPack GPS receiver

Return to bug 192345