diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-01-18 13:22:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 13:05:41 +0300 |
commit | ed27539e5a4b1ab255b9d73b4ca8c12716c0d817 (patch) | |
tree | eec563ded28fa25895d61f904c10b764bae16d1a /drivers/misc/eeprom/at24.c | |
parent | d1a29a4e334b82c5a95cfe24d9480ee44f19c83f (diff) | |
download | linux-ed27539e5a4b1ab255b9d73b4ca8c12716c0d817.tar.xz |
net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
commit 1771afd47430f5e95c9c3a2e3a8a63e67402d3fe upstream.
Both versions of the CPSW driver declare a CPSW_HEADROOM_NA macro that
takes NET_IP_ALIGN into account, but fail to use it appropriately when
storing incoming packets in memory. This results in the IPv4 source and
destination addresses to appear misaligned in memory, which causes
aligment faults that need to be fixed up in software.
So let's switch from CPSW_HEADROOM to CPSW_HEADROOM_NA where needed.
This gets rid of any alignment faults on the RX path on a Beaglebone
White.
Fixes: 9ed4050c0d75 ("net: ethernet: ti: cpsw: add XDP support")
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom/at24.c')
0 files changed, 0 insertions, 0 deletions