summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJoel Fernandes <joelf@ti.com>2013-09-04 18:55:14 -0500
committerMarek Vasut <marex@denx.de>2013-09-24 17:51:34 +0200
commit5290759cc4008075fb9333b32b49d74b8b5c3258 (patch)
treebd0f78f8da8dae91fd19633978faa9421b4928f0 /drivers
parent6b40852da5c8dd710f9d61204affff3c6a3c9d22 (diff)
downloadu-boot-imx-5290759cc4008075fb9333b32b49d74b8b5c3258.zip
u-boot-imx-5290759cc4008075fb9333b32b49d74b8b5c3258.tar.gz
u-boot-imx-5290759cc4008075fb9333b32b49d74b8b5c3258.tar.bz2
usb: gadget: Fix data aborts during USB ethernet boot
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 using DEFINE_CACHE_ALIGN_BUFFER. Tested on am335x_evm platform (beaglebone). Applies on 2013.10-rc1 branch. Cc: Tom Rini <trini@ti.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Joel Fernandes <joelf@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/ether.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 579893c..700d5fb 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -849,9 +849,10 @@ static struct usb_gadget_strings stringtab = {
};
/*============================================================================*/
-static u8 control_req[USB_BUFSIZ];
+DEFINE_CACHE_ALIGN_BUFFER(u8, control_req, USB_BUFSIZ);
+
#if defined(CONFIG_USB_ETH_CDC) || defined(CONFIG_USB_ETH_RNDIS)
-static u8 status_req[STATUS_BYTECOUNT] __attribute__ ((aligned(4)));
+DEFINE_CACHE_ALIGN_BUFFER(u8, status_req, STATUS_BYTECOUNT);
#endif