mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
usb: gadget: f_hid: fix zero length packet transfer
If the hid transfer with size divisible to EPs max packet size, it needs to set the req->zero to true, then the usb controller can transfer a zero length packet at the end according to the USB 2.0 spec. Signed-off-by: William Wu <william.wu@rock-chips.com> Change-Id: Ia63060b4551d30821beaf494c1ccd7dfb3b6ca22
This commit is contained in:
@@ -489,7 +489,7 @@ try_again:
|
||||
}
|
||||
|
||||
req->status = 0;
|
||||
req->zero = 0;
|
||||
req->zero = ((count % hidg->in_ep->maxpacket) == 0);
|
||||
req->length = count;
|
||||
req->complete = f_hidg_req_complete;
|
||||
req->context = hidg;
|
||||
|
||||
Reference in New Issue
Block a user