Skip to content

Commit

Permalink
USB: Fix s3c2410_udc usb speed handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yauhen Kharuzhy authored and Greg Kroah-Hartman committed Oct 17, 2008
1 parent 36e893d commit f9e9cff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/s3c2410_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f9e9cff

Please sign in to comment.