From: Yauhen Kharuzhy Date: Fri, 12 Sep 2008 16:02:23 +0000 (-0700) Subject: USB: Fix s3c2410_udc usb speed handling X-Git-Tag: Ubuntu-5.2.0-15.16~32622^2~56 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f9e9cff613b8239ce9159735aa662c9c85b478bf;p=mirror_ubuntu-eoan-kernel.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 29d13ebe7500..48f51b12d2e2 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;