Skip to contentSkip to conversation

usb/gadget/fsl_udc.c: fix data corruption

PATCH New Eric Bénard 1 participant 1 message Jul 30, 2010 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb/gadget/fsl_udc.c: fix data corruption

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.

---
 drivers/usb/gadget/fsl_udc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/usb/gadget/fsl_udc.c +2 -0
index 119afcb..77d6541 100644
@@ -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;
Signature · 7 lines
1.6.3.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox