]> git.baikalelectronics.ru Git - kernel.git/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>
Wed, 12 Sep 2012 17:58:37 +0000 (10:58 -0700)
commitbf301d4b2cd25b206581955c7bdfb5119ef91645
treef7a1f98192be0af83c21dbda5f524b3238a7c0c1
parentb606b61489dced42a88c3f6bff0b74f751da4b86
usb: chipidea: udc: fix setup of endpoint maxpacket size

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.

Cc: stable <stable@vger.kernel.org>
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