From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 6 Apr 2012 02:18:16 +0200 Subject: [U-Boot] [REFERENCE DON'T APPLY 1/3] dfu: Add default value for bwPollTimeout In-Reply-To: <1333465497-29909-1-git-send-email-stefan@datenfreihafen.org> References: <20120403145640.GG7109@novatech.datenfreihafen.org> <1333465497-29909-1-git-send-email-stefan@datenfreihafen.org> Message-ID: <201204060218.16728.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stefan Schmidt, Nice stuff, can you CC me when it comes to USB stuff, accidentally I became the new maintainer ? ;-) > --- > drivers/usb/gadget/dfu.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c > index 535e194..7aed344 100644 > --- a/drivers/usb/gadget/dfu.c > +++ b/drivers/usb/gadget/dfu.c > @@ -47,6 +47,10 @@ > #include > #include "dfu.h" > > +#ifndef POLL_TIMEOUT_MILLISECONDS > +#define POLL_TIMEOUT_MILLISECONDS 5 > +#endif > + > static struct flash_entity *flash_ents; > static int num_flash_ents; > > @@ -271,9 +275,14 @@ static void handle_getstatus(struct usb_request *req) > > /* send status response */ > dstat->bStatus = dev->dfu_status; > - /* FIXME: set dstat->bwPollTimeout */ > dstat->bState = dev->dfu_state; > dstat->iString = 0; > + /* FIXME: Use real values from flash subsystem here instead a hardcoded > + * value */ > + dstat->bwPollTimeout[0] = POLL_TIMEOUT_MILLISECONDS & 0xff; > + dstat->bwPollTimeout[1] = (POLL_TIMEOUT_MILLISECONDS >> 8) & 0xff; > + dstat->bwPollTimeout[2] = (POLL_TIMEOUT_MILLISECONDS >> 16) & 0xff; > + //req->actual = MIN(sizeof(*dstat), max); What do you expect from me to tell you about this patch? Or do you expect someone else to comment on this? > } > > static void handle_getstate(struct usb_request *req) Best regards, Marek Vasut