mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] usb/gadget/fsl_udc.c: fix data corruption
@ 2010-07-30 16:35 Eric Bénard
  0 siblings, 0 replies; only message in thread
From: Eric Bénard @ 2010-07-30 16:35 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox

the attached patch fixes a data corruption on the 8 last bytes of the first
packet received during dfu which are always wrong when dfu is executed for
the first time, thus preventing flashing the right binary on the board.
This was found and is tested on an i.MX27.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/usb/gadget/fsl_udc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc.c b/drivers/usb/gadget/fsl_udc.c
index 119afcb..77d6541 100644
--- a/drivers/usb/gadget/fsl_udc.c
+++ b/drivers/usb/gadget/fsl_udc.c
@@ -1155,6 +1155,8 @@ static struct ep_td_struct *fsl_build_dtd(struct fsl_req *req, unsigned *length,
 
 	dtd->size_ioc_sts = cpu_to_le32(swap_temp);
 
+	dma_inv_range(req->req.buf, req->req.buf + req->req.length);
+
 	VDBG("length = %d address= 0x%x", *length, (int)*dma);
 
 	return dtd;
-- 
1.6.3.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-30 16:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-30 16:35 [PATCH] usb/gadget/fsl_udc.c: fix data corruption Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox