diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2015-11-22 22:49:27 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-11-23 08:36:50 +0100 |
commit | 7454e176bbdfb68a39b728fbd3d0000aa183ddb1 (patch) | |
tree | 65968f6fb954db29e1ca168cc34d80781f5312d0 /drivers | |
parent | 3ee195ec12481e0f47214f1f1641ba1b872fa12f (diff) | |
download | barebox-7454e176bbdfb68a39b728fbd3d0000aa183ddb1.tar.gz barebox-7454e176bbdfb68a39b728fbd3d0000aa183ddb1.tar.xz |
net: usb: asix: make rx_fixup ax_skb buffer aligned
ax_skb receive buffer unalignment leads to consequent
unalignment data access in network stack routines,
especially in net_checksum().
By-turn unalignment data accesses lead to performance penalty.
Moreover on classic MIPS CPUs without hardware unalignment access
support this leads to undesirable exceptions.
At the moment barebox on MIPS can't parry these unalignment access
exceptions, so the Asix USB Ethernet chips, that need receive
fixup workaround, are completely unusable on MIPS without this patch.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/usb/asix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 4c53a142f1..ff8039832f 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c @@ -158,7 +158,7 @@ struct asix_rx_fixup_info { u16 size; u16 offset; bool split_head; - unsigned char ax_skb[RX_FIXUP_SIZE]; + unsigned char ax_skb[RX_FIXUP_SIZE] __aligned(2); }; struct asix_common_private { |