diff options
author | Wolfgang Denk <wd@denx.de> | 2012-03-30 23:56:04 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-03-30 23:56:04 +0200 |
commit | a7ed871b728f846303c234d3622a182c9e25579e (patch) | |
tree | d8a3620856e340e0bb7eb3d98bd58bb508dde82b /drivers/usb | |
parent | 57d40ab70b23740bd5ecde25b88514f70412bbe9 (diff) | |
parent | f9da0f894328802cb8aaeb8a24660e37ff624d26 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-usb
* 'master' of git://git.denx.de/u-boot-usb:
Enable high speed support for USB device framework and usbtty
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/core.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/ep0.c | 23 |
2 files changed, 19 insertions, 5 deletions
diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c index 4f2ebab9e2..46ab3f67f8 100644 --- a/drivers/usb/gadget/core.c +++ b/drivers/usb/gadget/core.c @@ -212,7 +212,6 @@ struct usb_device_descriptor *usbd_device_device_descriptor (struct usb_device_i return (device->device_descriptor); } - /** * usbd_device_configuration_descriptor * @device: which device diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c index 22499d36bf..aa8f91600d 100644 --- a/drivers/usb/gadget/ep0.c +++ b/drivers/usb/gadget/ep0.c @@ -338,12 +338,27 @@ static int ep0_get_descriptor (struct usb_device_instance *device, } break; case USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER: +#if defined(CONFIG_USBD_HS) { - /* If a USB device supports both a full speed and low speed operation - * we must send a Device_Qualifier descriptor here - */ - return -1; + struct usb_qualifier_descriptor *qualifier_descriptor = + device->qualifier_descriptor; + + if (!qualifier_descriptor) + return -1; + + /* copy descriptor for this device */ + copy_config(urb, qualifier_descriptor, + sizeof(struct usb_qualifier_descriptor), + max); + } + dbg_ep0(3, "copied qualifier descriptor, actual_length: 0x%x", + urb->actual_length); +#else + return -1; +#endif + break; + default: return -1; } |