{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7A) },
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7B) },
{ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) },
+ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) },
/* Motorola devices */
{ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2a70, 0xff, 0xff, 0xff) }, /* mdm6600 */
struct usb_wwan_intf_private *data;
unsigned long device_flags;
+ if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID) {
+ if ( 0 != (serial->dev->config->desc.bmAttributes & 0x20)){
+ usb_enable_autosuspend(serial->dev);
+ }
+ }
+
data = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL);
if (!data)
return -ENOMEM;
#include <linux/serial.h>
#include "usb-wwan.h"
+#define HW_bcdUSB 0x0110
+#define HUAWEI_VENDOR_ID 0x12d1
+
/*
* Generate DTR/RTS signals on the port using the SET_CONTROL_LINE_STATE request
* in CDC ACM.
{
struct usb_wwan_port_private *portdata;
struct usb_wwan_intf_private *intfdata;
+ struct usb_host_endpoint *ep;
int i;
int left, todo;
struct urb *this_urb = NULL; /* spurious */
memcpy(this_urb->transfer_buffer, buf, todo);
this_urb->transfer_buffer_length = todo;
+ if((HUAWEI_VENDOR_ID == port->serial->dev->descriptor.idVendor)
+ && (HW_bcdUSB != port->serial->dev->descriptor.bcdUSB)){
+ ep = usb_pipe_endpoint(this_urb->dev, this_urb->pipe);
+ if(ep && (0 != this_urb->transfer_buffer_length)
+ && (0 == this_urb->transfer_buffer_length % ep->desc.wMaxPacketSize)){
+ this_urb->transfer_flags |= URB_ZERO_PACKET;
+ }
+ }
+
spin_lock_irqsave(&intfdata->susp_lock, flags);
if (intfdata->suspended) {
usb_anchor_urb(this_urb, &portdata->delayed);