]> git.hungrycats.org Git - linux/commit
usb: chipidea: udc: fix setup of endpoint maxpacket size
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Wed, 12 Sep 2012 11:58:00 +0000 (14:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:36 +0000 (10:39 -0700)
commit9a3855f7b0b7e47bb77db5f1e1000c68ae549cc6
treeba555faba75e35e22c3d726206c1b55f58042e96
parent2f83444297c8221497145cd26746099610a7d6f8
usb: chipidea: udc: fix setup of endpoint maxpacket size

commit 7f67c38bdcb6d8bce02e10521fbf1618b586319f upstream.

This patch changes the setup of the endpoint maxpacket size. All non control
endpoints are initialized with an undefined ((unsigned short)~0) maxpacket
size. The maxpacket size of Endpoint 0 will be kept at CTRL_PAYLOAD_MAX.

Some gadget drivers check for the maxpacket size before they enable the
endpoint, which leads to a wrong state in these drivers.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c