[U-Boot] [PATCH 5/9] Generate appropriate responses for DFU
Marek Vasut
marex at denx.de
Wed Nov 28 03:46:04 CET 2012
Dear Pantelis Antoniou,
> Make sure appropriate responses for the DFU protocal are
> generated.
I dont understand this patch, please explain it properly in the commit message.
> Signed-off-by: Pantelis Antoniou <panto at antoniou-consulting.com>
> ---
> drivers/usb/gadget/composite.c | 9 +++++++++
> drivers/usb/gadget/ep0.c | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/usb/gadget/composite.c
> b/drivers/usb/gadget/composite.c index ebb5131..1ae318c 100644
> --- a/drivers/usb/gadget/composite.c
> +++ b/drivers/usb/gadget/composite.c
> @@ -773,6 +773,15 @@ composite_setup(struct usb_gadget *gadget, const
> struct usb_ctrlrequest *ctrl) if (value >= 0)
> value = min(w_length, (u16) value);
> break;
> +
> +#ifdef CONFIG_DFU_FUNCTION
> + case DFU_DT_FUNC: /* DFU */
> + value = config_desc(cdev, w_value);
> + if (value >= 0)
> + value = min(w_length, (u16) value);
> + break;
> +#endif
> +
> default:
> goto unknown;
> }
> diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c
> index aa8f916..971d846 100644
> --- a/drivers/usb/gadget/ep0.c
> +++ b/drivers/usb/gadget/ep0.c
> @@ -221,6 +221,7 @@ static int ep0_get_descriptor (struct
> usb_device_instance *device, break;
>
> case USB_DESCRIPTOR_TYPE_CONFIGURATION:
> + case USB_DESCRIPTOR_TYPE_OTHER_SPEED_CONFIGURATION:
> {
> struct usb_configuration_descriptor
> *configuration_descriptor;
Best regards,
Marek Vasut
More information about the U-Boot
mailing list