[U-Boot] [PATCH 5/9] Generate appropriate responses for DFU

Pantelis Antoniou panto at antoniou-consulting.com
Wed Nov 28 09:27:02 CET 2012


Hi Marek,

On Nov 28, 2012, at 4:46 AM, Marek Vasut wrote:

> 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.
> 

Turns out this is not even quite correct... Updated patchset in a little bit.

>> 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