diff options
author | Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> | 2011-10-20 22:25:37 +0300 |
---|---|---|
committer | Remy Bohmer <linux@bohmer.net> | 2011-12-11 14:42:10 +0100 |
commit | 9792987721c7980453fe6447c3fa6593b44f8458 (patch) | |
tree | ebe24444679c835ec30deadc9a9067c146e3d0a6 /include/hush.h | |
parent | 241d9a61b3c073aec7632af1333631ab61455cc4 (diff) | |
download | u-boot-imx-9792987721c7980453fe6447c3fa6593b44f8458.zip u-boot-imx-9792987721c7980453fe6447c3fa6593b44f8458.tar.gz u-boot-imx-9792987721c7980453fe6447c3fa6593b44f8458.tar.bz2 |
usb: align usb_endpoint_descriptor to 16-bit boundary
The usb_endpoint_descriptor struct is 7 bytes large and is
defined as an array (ep_desc[USB_MAXENDPOINTS])
in the usb_interface struct in include/usb.h
This fact will result in that every odd index in that
array will start at an uneven address, this in
turn makes accesses to u16 wMaxPacketSize unaligned.
Such accesses are illegal on the OpenRISC architecture
(as well as other architectures) and will render a bus error.
Setting the aligned(2) attribute on usb_endpoint_descriptor
will force wMaxPacketSize to a 16-bit boundary.
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Diffstat (limited to 'include/hush.h')
0 files changed, 0 insertions, 0 deletions