From: Yauhen Kharuzhy Date: Fri, 12 Sep 2008 16:02:23 +0000 (-0700) Subject: USB: Fix s3c2410_udc usb speed handling X-Git-Tag: v2.6.28-rc1~254^2~56 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f9e9cff613b8239ce9159735aa662c9c85b478bf;p=linux-2.6-omap-h63xx.git USB: Fix s3c2410_udc usb speed handling 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 Cc: stable Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index 29d13ebe750..48f51b12d2e 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -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;