From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 28 Nov 2012 03:46:36 +0100 Subject: [U-Boot] [PATCH 6/9] Properly zero out timeout value In-Reply-To: <1354106642-4587-7-git-send-email-panto@antoniou-consulting.com> References: <1354106642-4587-1-git-send-email-panto@antoniou-consulting.com> <1354106642-4587-7-git-send-email-panto@antoniou-consulting.com> Message-ID: <201211280346.36554.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 Pantelis Antoniou, > Zero out timeout value; letting it filled with undefined values > ends up with the dfu host hanging. > > Signed-off-by: Pantelis Antoniou > --- > drivers/usb/gadget/f_dfu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c > index 10547e3..a322ae5 100644 > --- a/drivers/usb/gadget/f_dfu.c > +++ b/drivers/usb/gadget/f_dfu.c > @@ -164,6 +164,9 @@ static void handle_getstatus(struct usb_request *req) > > /* send status response */ > dstat->bStatus = f_dfu->dfu_status; > + dstat->bwPollTimeout[0] = 0; > + dstat->bwPollTimeout[1] = 0; > + dstat->bwPollTimeout[2] = 0; What about calling memset() here ? > dstat->bState = f_dfu->dfu_state; > dstat->iString = 0; > } Best regards, Marek Vasut