Commit cce88b1a authored by Lu Baolu's avatar Lu Baolu Committed by Luis Henriques

usb: cdc-acm: send zero packet for intel 7260 modem

commit ffdb1e36 upstream.

For Intel 7260 modem, it is needed for host side to send zero
packet if the BULK OUT size is equal to USB endpoint max packet
length. Otherwise, modem side may still wait for more data and
cannot give response to host side.
Signed-off-by: default avatarKonrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 291625aa
...@@ -1418,6 +1418,8 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1418,6 +1418,8 @@ static int acm_probe(struct usb_interface *intf,
usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress), usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
NULL, acm->writesize, acm_write_bulk, snd); NULL, acm->writesize, acm_write_bulk, snd);
snd->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; snd->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
if (quirks & SEND_ZERO_PACKET)
snd->urb->transfer_flags |= URB_ZERO_PACKET;
snd->instance = acm; snd->instance = acm;
} }
...@@ -1880,6 +1882,10 @@ static const struct usb_device_id acm_ids[] = { ...@@ -1880,6 +1882,10 @@ static const struct usb_device_id acm_ids[] = {
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
USB_CDC_ACM_PROTO_AT_CDMA) }, USB_CDC_ACM_PROTO_AT_CDMA) },
{ USB_DEVICE(0x1519, 0x0452), /* Intel 7260 modem */
.driver_info = SEND_ZERO_PACKET,
},
{ } { }
}; };
......
...@@ -135,3 +135,4 @@ struct acm { ...@@ -135,3 +135,4 @@ struct acm {
#define IGNORE_DEVICE BIT(5) #define IGNORE_DEVICE BIT(5)
#define QUIRK_CONTROL_LINE_STATE BIT(6) #define QUIRK_CONTROL_LINE_STATE BIT(6)
#define CLEAR_HALT_CONDITIONS BIT(7) #define CLEAR_HALT_CONDITIONS BIT(7)
#define SEND_ZERO_PACKET BIT(8)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment