[PATCH] usb/gadget/fsl_udc.c: fix data corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux