修改一、drivers/net/usb/qmi_wwan.c
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 5645921..f8f0020 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -614,7 +614,7 @@ static const struct usb_device_id products[] = {
{QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem
device (N0279, VU730) */
{QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem
device (VL176) */
{QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem
device (VP412) */
- {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem
device (VP413) */
+// {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem
device (VP413) */
{QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem
device (VR305) */
{QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000
Modem device (VR306) */
{QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi
2000 Modem device (VR307) */
修改二、drivers/usb/serial/option.c
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -530,6 +530,22 @@ static const struct option_blacklist_info
telit_le920_blacklist = {
};
static const struct usb_device_id option_ids[] = {
+#if 1 //Added by Quectel
+ { USB_DEVICE(0x05C6, 0x9090) }, /* Quectel UC15 */
+ { USB_DEVICE(0x05C6, 0x9003) }, /* Quectel UC20 */
+ { USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC25 */
+ { USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21 */
+ { USB_DEVICE(0x05C6, 0x9215) }, /* Quectel EC20 */
+ { USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
+ { USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
+ { USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
+ { USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
+ { USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
+ { USB_DEVICE(0x2C7C, 0x0512) }, /* Quectel EG12/EG18 */
+ { USB_DEVICE(0x2C7C, 0x6026) }, /* Quectel EC200 */
+ { USB_DEVICE(0x2C7C, 0x6120) }, /* Quectel UC200 */
+ { USB_DEVICE(0x2C7C, 0x6000) }, /* Quectel EC200/UC200 */
+#endif
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
@@ -1377,6 +1393,9 @@ static struct usb_serial_driver
option_1port_device = {
#ifdef CONFIG_PM
.suspend = usb_wwan_suspend,
.resume = usb_wwan_resume,
+#if 1 //add by Quectel
+ .reset_resume = usb_wwan_resume,
+#endif
#endif
};
@@ -1421,6 +1440,27 @@ static int option_probe(struct usb_serial
*serial,
&serial->interface->cur_altsetting->desc;
struct usb_device_descriptor *dev_desc =
&serial->dev->descriptor;
+#if 1 //Added by Quectel
+ //Quectel UC20's interface 4 can be used as USB Network device
+ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
serial->dev->descriptor.idProduct ==
+ cpu_to_le16(0x9003) &&
serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
+ return -ENODEV;
+ //Quectel EC20's interface 4 can be used as USB Network device
+ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
serial->dev->descriptor.idProduct ==
+ cpu_to_le16(0x9215) &&
serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
+ return -ENODEV;
+ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
+ __u16 idProduct =
le16_to_cpu(serial->dev->descriptor.idProduct);
+
+ //Quectel EC200&UC200's interface 0 can be used as USB
Network device (ecm, rndis)
+ if
(serial->interface->cur_altsetting->desc.bInterfaceClass != 0xFF)
+ return -ENODEV;
+ //Quectel
EC25&EC21&EG91&EG95&EG06&EP06&EM06&BG96&AG35&EG12&EG18's interface 4 can be
used as USB network device (qmi,ecm,mbim)
+ if ((idProduct != 0x6026 && idProduct != 0x6126) &&
serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
+ return -ENODEV;
+ }
+#endif
+
/* Never bind to the CD-Rom emulation interface */
if (iface_desc->bInterfaceClass == 0x08)
return -ENODEV;
修改三、drivers/usb/serial/qcserial.c
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -53,7 +53,7 @@ static const struct usb_device_id id_table[] = {
{DEVICE_G1K(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
{DEVICE_G1K(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
{DEVICE_G1K(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
- {DEVICE_G1K(0x05c6, 0x9008)}, /* Generic Gobi QDL device */
+// {DEVICE_G1K(0x05c6, 0x9008)}, /* Generic Gobi QDL device */
{DEVICE_G1K(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
{DEVICE_G1K(0x05c6, 0x9201)}, /* Generic Gobi QDL device */
{DEVICE_G1K(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
修改四、drivers/net/usb/qmi_wwan.c
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -456,8 +456,22 @@ static struct urb *usb_wwan_setup_urb(struct
usb_serial_port *port,
/* Fill URB using supplied data. */
usb_fill_bulk_urb(urb, serial->dev,
- usb_sndbulkpipe(serial->dev, endpoint) | dir,
- buf, len, callback, ctx);
+ usb_sndbulkpipe(serial->dev, endpoint) | dir,
+ buf, len, callback, ctx);
+
+#if 1 //Added by Quectel for Zero Packet
+ if (dir == USB_DIR_OUT) {
+ struct usb_device_descriptor *desc =
&serial->dev->descriptor;
+ if (desc->idVendor == cpu_to_le16(0x05C6) &&
desc->idProduct == cpu_to_le16(0x9090))
+ urb->transfer_flags |= URB_ZERO_PACKET;
+ if (desc->idVendor == cpu_to_le16(0x05C6) &&
desc->idProduct == cpu_to_le16(0x9003))
+ urb->transfer_flags |= URB_ZERO_PACKET;
+ if (desc->idVendor == cpu_to_le16(0x05C6) &&
desc->idProduct == cpu_to_le16(0x9215))
+ urb->transfer_flags |= URB_ZERO_PACKET;
+ if (desc->idVendor == cpu_to_le16(0x2C7C))
+ urb->transfer_flags |= URB_ZERO_PACKET;
+ }
+#endif
return urb;
}
评论0