[U-Boot] [PATCH v3 4/5] usb/gadget: add the fastboot gadget

Bo Shen voice.shen at atmel.com
Fri Apr 11 09:14:38 CEST 2014


Hi Rob Herring,
   I am just do a function testing on Atmel sama5d3xek board. And a 
small comment as following.

   Btw, do you test to transfer big size file. I try a file bigger than 
100MiB, it will hang. However use DFU or RNDIS don't meet this issue.

On 04/11/2014 03:18 AM, Rob Herring wrote:
> +static void fastboot_unbind(struct usb_gadget *gadget)
> +{
> +	usb_ep_free_request(gadget->ep0, ep0_req);
> +	ep_in->driver_data = NULL;
> +	ep_out->driver_data = NULL;
> +
> +	gadget_is_connected = 0;
> +	usb_gadget_disconnect(gadget);
> +}

[snip]

> +static void fastboot_disconnect(struct usb_gadget *gadget)
> +{
> +	fastboot_disable_ep(gadget);
> +	gadget_is_connected = 0;

Do this only in unbind, as unbind is really disconnect.

> +}
> +
> +struct usb_gadget_driver fast_gadget = {
> +	.speed		= USB_SPEED_HIGH,
> +	.bind		= fastboot_bind,
> +	.unbind		= fastboot_unbind,
> +	.setup		= fastboot_setup,
> +	.disconnect	= fastboot_disconnect,
> +};

Best Regards,
Bo Shen


More information about the U-Boot mailing list