USB: Fix s3c2410_udc usb speed handling
authorYauhen Kharuzhy <jekhor@gmail.com>
Fri, 12 Sep 2008 16:02:23 +0000 (09:02 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Oct 2008 21:40:58 +0000 (14:40 -0700)
The new composite framework revealed a weakness in the
s3c2410_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: Yauhen Kharuzhy <jekhor@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/s3c2410_udc.c

index 29d13ebe7500bf482745c5cadf35972ca02ffea3..48f51b12d2e21010140448a23b554cc5ee31a145 100644 (file)
@@ -1651,7 +1651,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
                return -EBUSY;
 
        if (!driver->bind || !driver->setup
-                       || driver->speed != USB_SPEED_FULL) {
+                       || driver->speed < USB_SPEED_FULL) {
                printk(KERN_ERR "Invalid driver: bind %p setup %p speed %d\n",
                        driver->bind, driver->setup, driver->speed);
                return -EINVAL;