summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_msctest.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2010-10-06 14:29:00 +0000
committerglebius <glebius@FreeBSD.org>2010-10-06 14:29:00 +0000
commitff60b600fd22ef1399e00ce49fd2f33d709f10f7 (patch)
treec32765ccd19abee6d78d5dad1d28e0175cb341e2 /sys/dev/usb/usb_msctest.c
parentce0838f76027fe60b391104523d17c8dc66b0f8a (diff)
downloadFreeBSD-src-ff60b600fd22ef1399e00ce49fd2f33d709f10f7.zip
FreeBSD-src-ff60b600fd22ef1399e00ce49fd2f33d709f10f7.tar.gz
Add support to Alcatel/TCTMobile X080S USB 3G modem. The device needs
special eject command to reappear as modem. It also requires DIR_IN flag in the command message, so we supply some dummy data along with the command. Feedback from X080S owners appreciated. I have not a pure Alcatel/TCTMobile device, but another one under "Svyaznoy" (Связной) brand, and I didn't yet managed to get it working. It is successfully recognized, it responds to AT commands, but it shuts up right after successfull CONNECT response. Reviewed by: hps
Diffstat (limited to 'sys/dev/usb/usb_msctest.c')
-rw-r--r--sys/dev/usb/usb_msctest.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c
index ed9eac4..15b0ead 100644
--- a/sys/dev/usb/usb_msctest.c
+++ b/sys/dev/usb/usb_msctest.c
@@ -97,6 +97,8 @@ static uint8_t scsi_cmotech_eject[] = { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43,
static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 };
+static uint8_t scsi_tct_eject[] = { 0x06, 0xf5, 0x04, 0x02, 0x52, 0x70 };
+static uint8_t scsi_tct_dummy[4];
#define BULK_SIZE 64 /* dummy */
#define ERR_CSW_FAILED -1
@@ -619,6 +621,11 @@ usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method)
&scsi_huawei_eject, sizeof(scsi_huawei_eject),
USB_MS_HZ);
break;
+ case MSC_EJECT_TCT:
+ err = bbb_command_start(sc, DIR_IN, 0, &scsi_tct_dummy,
+ sizeof(scsi_tct_dummy), &scsi_tct_eject,
+ sizeof(scsi_tct_eject), USB_MS_HZ);
+ break;
default:
printf("usb_msc_eject: unknown eject method (%d)\n", method);
break;
OpenPOWER on IntegriCloud