usb: gadget: mbim: Send zero-length packets

If control packet size is a multiple of 64b and is smaller than 4kb,
send after it a zero-length packet to the host.

CRs-Fixed: 352523
Change-Id: I44a97cacf7d92d66c91f81405802f7d1cf5f5285
Signed-off-by: Anna Perel <aperel@codeaurora.org>
This commit is contained in:
Anna Perel
2012-04-18 17:25:59 +03:00
parent be8ee19082
commit 2dfcacafb1

View File

@@ -1048,7 +1048,7 @@ mbim_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
pr_info("control request: %02x.%02x v%04x i%04x l%d\n",
ctrl->bRequestType, ctrl->bRequest,
w_value, w_index, w_length);
req->zero = 0;
req->zero = (value < w_length);
req->length = value;
value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC);
if (value < 0) {