]> git.baikalelectronics.ru Git - kernel.git/commit
USB gadget: Handle endpoint requests at the function level
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 20 Oct 2009 22:03:38 +0000 (00:03 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:55:15 +0000 (11:55 -0800)
commit62c9232555e4ac7ad362b4b2b47ecfc4b4899bae
treea2f5b2afd848619915aa8e1f3cfeb3c94289b20b
parent66dac47aebcdc95fc51a01135401996f3b9ccbae
USB gadget: Handle endpoint requests at the function level

Control requests targeted at an endpoint (that is sent to EP0 but
specifying the target endpoint address in wIndex) are dispatched to the
current configuration's setup callback, requiring all gadget drivers to
dispatch the requests to the correct function driver.

To avoid this, record which endpoints are used by each function in the
composite driver SET CONFIGURATION handler and dispatch requests
targeted at endpoints to the correct function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/composite.c
include/linux/usb/composite.h