From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Mon, 14 Apr 2014 10:28:13 +0800 Subject: [U-Boot] [PATCH v3 4/5] usb/gadget: add the fastboot gadget In-Reply-To: References: <1397157488-8695-1-git-send-email-robherring2@gmail.com> <1397157488-8695-5-git-send-email-robherring2@gmail.com> <5347965E.4010907@atmel.com> Message-ID: <534B47BD.3030808@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Rob, On 04/11/2014 08:55 PM, Rob Herring wrote: > On Fri, Apr 11, 2014 at 2:14 AM, Bo Shen wrote: >> 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. > > How much RAM do you have? It will happily download into the end of RAM > overwriting u-boot if loadsize is not set. DFU at least has its own > buffer size configuration. There are 512MiB RAM on board. So, it won't be a problem to load this file from the begin of the RAM (As the u-boot is relocated to top RAM). >> >> >> 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. > > So, what should disconnect function do? Maybe some misunderstanding. I mean the "gadget_is_connected" should be cleared in unbind function while not in disconnect function. > Rob > Best Regards, Bo Shen