diff options
| author | Marek Vasut <[email protected]> | 2012-08-26 10:19:20 +0000 |
|---|---|---|
| committer | Joe Hershberger <[email protected]> | 2012-09-27 12:22:09 -0500 |
| commit | e2a66e609745470b1157fe6b6663c804ee44b0b9 (patch) | |
| tree | 8a7d4cc92516382cbe1af6efc4821fb3c3d6c61a /drivers | |
| parent | f91ba0ecbc8232691856d2d7524fd53067ca91c9 (diff) | |
FEC: Do not pass unaligned buffer to network stack
Do not pass unaligned RX buffer to the upper layers. The upper layer,
especially in the ARP case, recycles the buffer and passes it back into
the FEC, into it's TX path. With caches enabled, the FEC hangs on this
from time to time.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Benoit Thebaudeau <benoit.thebaudeau@advans>
Cc: Eric Nelson <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Joe Hershberger <[email protected]>
Tested-by: Fabio Estevam <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/fec_mxc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index fbfc842aca0..7b6a997cd05 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -31,6 +31,7 @@ #include <asm/arch/imx-regs.h> #include <asm/io.h> #include <asm/errno.h> +#include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR; @@ -791,7 +792,7 @@ static int fec_recv(struct eth_device *dev) uint16_t bd_status; uint32_t addr, size; int i; - uchar buff[FEC_MAX_PKT_SIZE]; + uchar buff[FEC_MAX_PKT_SIZE] __aligned(ARCH_DMA_MINALIGN); /* * Check if any critical events have happened |
