[PATCH] Switch Qisda H21mass storage to 3G modem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch is to switch Qisda H21 mass storage mode to 3G modem. 
If need any modification, please tell me. Thanks.
Brad.

diff --git a/drivers/usb/storage/initializers.c
b/drivers/usb/storage/initializers.c
index 2dd9bd4..56808fc 100644
--- a/drivers/usb/storage/initializers.c
+++ b/drivers/usb/storage/initializers.c
@@ -102,3 +102,30 @@ int usb_stor_huawei_e220_init(struct us_data *us)
 	US_DEBUGP("usb_control_msg performing result is %d\n", result);
 	return (result ? 0 : -1);
 }
+
+int usb_stor_qisda_h21_init(struct us_data *us)
+{
+
+	int result;
+	struct
+	{
+		unsigned char header[4];
+		unsigned char data[12];
+	} h21_Switch_Mode_Req;
+
+	h21_Switch_Mode_Req.data[5]=0x01;  
+	
+	result = usb_stor_control_msg(us, us->send_ctrl_pipe,
+                                0x04, 
+                                USB_TYPE_STANDARD | USB_TYPE_VENDOR,
+                                0x00, 
+                                0x00, 
+                                (void*)&h21_Switch_Mode_Req, 
+                                sizeof(h21_Switch_Mode_Req), 
+                                1000);
+
+	
+	US_DEBUGP("usb_control_msg performing result is %d\n", result);
+	return (result ? 0 : -1);
+}
+
diff --git a/drivers/usb/storage/initializers.h
b/drivers/usb/storage/initializers.h
index 529327f..b656264 100644
--- a/drivers/usb/storage/initializers.h
+++ b/drivers/usb/storage/initializers.h
@@ -48,3 +48,6 @@ int usb_stor_ucr61s2b_init(struct us_data *us);
 
 /* This places the HUAWEI E220 devices in multi-port mode */
 int usb_stor_huawei_e220_init(struct us_data *us);
+
+/* This places the QISDA H21 devices in multi-port mode */
+int usb_stor_qisda_h21_init(struct us_data *us);
diff --git a/drivers/usb/storage/unusual_devs.h
b/drivers/usb/storage/unusual_devs.h
index 4b8b690..1fac767 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1780,6 +1780,12 @@ UNUSUAL_DEV(  0x1652, 0x6600, 0x0201, 0x0201,
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_IGNORE_RESIDUE ),
 
+UNUSUAL_DEV(  0x1da5, 0xf000, 0x0000, 0x0000,
+		"QISDA HSPA Modem",
+		"Mass Storage",
+		US_SC_DEVICE, US_PR_DEVICE, usb_stor_qisda_h21_init,
+		0),
+
 UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001,
 		"ST",
 		"2A",


***************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent those of Qisda Corporation and its affiliates. Qisda Corporation is not responsible for any liability or damaged caused by viruses transmitted with this e-mail or its attachments. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is private, legally privileged, confidential or exempt from disclosure, and intended for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited. Thank you. 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux