]> git.baikalelectronics.ru Git - kernel.git/commit
USB: musb: respect usb_request->zero in control requests
authorDaniel Glöckner <dg@emlix.com>
Tue, 17 Nov 2009 09:52:56 +0000 (15:22 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 1 Dec 2009 00:43:16 +0000 (16:43 -0800)
commit763597a30f5b6d0257ee55b0493aee6f3614344b
tree653fc1d0bdad8d910047c1c3fa37fcb6a9d50add
parentd03e7f05705507f0b5cf1e7c2c867b9a6feb0f1c
USB: musb: respect usb_request->zero in control requests

In gadget mode the answer to a control request should be followed by
a zero-length packet if the amount transferred is an exact multiple of
the endpoint's packet size and the requests has its "zero" flag set.

This patch prevents the request from being immediately removed from the
queue when a control IN transfer ends on a full packet and "zero" is set.
The next time ep0_txstate is entered, a zero-length packet is queued and
the request is removed as fifo_count is 0.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_gadget_ep0.c