usb: misc: Send zero-length packets on bulk OUT
Set the flag that enables the host controller to send zero-length
packets if the payload size is a multiple of the max packet size
(typically 512 bytes) in order to avoid cases in which the device
may stall while waiting for more data.
CRs-fixed: 373737
Change-Id: I779d00837a12bcd1d7df12b77ac1f1f5aab0fe68
Signed-off-by: Jack Pham <jackp@codeaurora.org>
diff --git a/drivers/usb/misc/mdm_data_bridge.c b/drivers/usb/misc/mdm_data_bridge.c
index db2f40a..1c9de07 100644
--- a/drivers/usb/misc/mdm_data_bridge.c
+++ b/drivers/usb/misc/mdm_data_bridge.c
@@ -497,6 +497,8 @@
usb_fill_bulk_urb(txurb, dev->udev, dev->bulk_out,
skb->data, skb->len, data_bridge_write_cb, skb);
+ txurb->transfer_flags |= URB_ZERO_PACKET;
+
if (test_bit(SUSPENDED, &dev->flags)) {
usb_anchor_urb(txurb, &dev->delayed);
goto free_urb;