USB: Fix pxa27x_udc usb speed handling.

The new composite framework revealed a weakness in the
pxa27x_udc driver gadget register function. Instead of
checking if speed asked for was USB_LOW_SPEED upon
usb_gadget_register() to deny service, it checked only
for USB_FULL_SPEED, thus denying service to usb high
speed capable gadgets (like g_ether).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Robert Jarzmik 2008-08-11 18:28:13 +02:00 committed by Greg Kroah-Hartman
parent c8fd2c37b9
commit bf31338bfd

View File

@ -1622,7 +1622,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
struct pxa_udc *udc = the_controller; struct pxa_udc *udc = the_controller;
int retval; int retval;
if (!driver || driver->speed != USB_SPEED_FULL || !driver->bind if (!driver || driver->speed < USB_SPEED_FULL || !driver->bind
|| !driver->disconnect || !driver->setup) || !driver->disconnect || !driver->setup)
return -EINVAL; return -EINVAL;
if (!udc) if (!udc)