public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Joel Fernandes <joelf@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: gadget: Fix data aborts during USB ethernet boot
Date: Tue, 20 Aug 2013 18:32:58 -0500	[thread overview]
Message-ID: <1377041578-9149-1-git-send-email-joelf@ti.com> (raw)

As seen on GCC 4.6 Linaro compiler, control_req buffer is not aligned
on 4 byte boundaray causing data aborts in eth_setup -> conf_buf
during dhcp boot over usb_ether. Fix the issue my aligning control_req
buffer to 4-byte boundary.

Tested on am335x_evm platform (beaglebone).
Applies on 2013.10-rc1 branch.

Cc: Tom Rini <trini@ti.com>
Signed-off-by: Joel Fernandes <joelf@ti.com>
---
 drivers/usb/gadget/ether.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 579893c..251d7b2 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -849,7 +849,7 @@ static struct usb_gadget_strings	stringtab = {
 };
 
 /*============================================================================*/
-static u8 control_req[USB_BUFSIZ];
+static u8 control_req[USB_BUFSIZ] __attribute__ ((aligned(4)));
 #if defined(CONFIG_USB_ETH_CDC) || defined(CONFIG_USB_ETH_RNDIS)
 static u8 status_req[STATUS_BYTECOUNT] __attribute__ ((aligned(4)));
 #endif
-- 
1.7.9.5

             reply	other threads:[~2013-08-20 23:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 23:32 Joel Fernandes [this message]
2013-08-27 13:52 ` [U-Boot] [PATCH] usb: gadget: Fix data aborts during USB ethernet boot Marek Vasut
2013-09-04 21:30   ` Joel Fernandes
2013-09-04 21:38     ` Marek Vasut
2013-09-04 21:54       ` Joel Fernandes
2013-09-04 22:02         ` Marek Vasut

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=1377041578-9149-1-git-send-email-joelf@ti.com \
    --to=joelf@ti.com \
    --cc=u-boot@lists.denx.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