mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 02:03:31 +00:00
Add support for the E1752 3G modem and the required eject command.
Submitted by: Milan Obuch
This commit is contained in:
parent
3e889e246c
commit
2386d71421
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203905
@ -92,6 +92,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW,
|
||||
#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_devs[] = {
|
||||
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_device *udev,
|
||||
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;
|
||||
|
@ -94,6 +94,9 @@ static uint8_t scsi_ztestor_eject[] = { 0x85, 0x01, 0x01, 0x01, 0x18, 0x01,
|
||||
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, uint8_t iface_index, int method)
|
||||
&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;
|
||||
|
@ -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,
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user