From: "Eric Bénard" <eric@eukrea.com>
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: [PATCH] usb/gadget/fsl_udc.c: fix data corruption
Date: Fri, 30 Jul 2010 18:35:32 +0200 [thread overview]
Message-ID: <1280507732-1721-1-git-send-email-eric@eukrea.com> (raw)
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
reply other threads:[~2010-07-30 16:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1280507732-1721-1-git-send-email-eric@eukrea.com \
--to=eric@eukrea.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox