OpenCloudOS-Kernel/drivers/net/ethernet/ti
Ard Biesheuvel 1771afd474 net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
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: 9ed4050c0d ("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>
2022-01-19 14:19:19 +00:00
..
Kconfig Revert "net: build all switchdev drivers as modules when the bridge is a module" 2021-08-04 12:35:07 +01:00
Makefile net: ti: am65-cpsw-nuss: Add switchdev support 2021-02-11 17:52:13 -08:00
am65-cpsw-ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
am65-cpsw-nuss.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-16 16:13:19 -08:00
am65-cpsw-nuss.h net: ti: am65-cpsw-nuss: fix RX IRQ state after .ndo_stop() 2021-08-06 11:08:57 +01:00
am65-cpsw-qos.c net: ethernet: ti: am65-cpsw-qos: Demote non-conformant function header 2021-01-16 18:13:10 -08:00
am65-cpsw-qos.h ethernet: ti: am65-cpsw-qos: add TAPRIO offload support 2020-05-14 17:33:30 -07:00
am65-cpsw-switchdev.c net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge 2021-08-10 13:22:57 -07:00
am65-cpsw-switchdev.h net: ti: am65-cpsw-nuss: Add switchdev support 2021-02-11 17:52:13 -08:00
am65-cpts.c net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname() 2021-06-09 15:24:43 -07:00
am65-cpts.h ethernet: ti: am65-cpts: Add missing inline qualifier to stub functions 2020-05-15 16:32:27 -07:00
cpmac.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
cpsw-common.c
cpsw-phy-sel.c net: ethernet: ti: cpsw-phy-sel: Use devm_platform_ioremap_resource_byname() 2021-06-09 15:27:55 -07:00
cpsw.c net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account 2022-01-19 14:19:19 +00:00
cpsw.h
cpsw_ale.c net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory 2021-11-10 14:33:04 +00:00
cpsw_ale.h net: ethernet: ti: cpsw_ale: add cpsw_ale_vlan_del_modify() 2020-11-02 16:41:07 -08:00
cpsw_ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
cpsw_new.c net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account 2022-01-19 14:19:19 +00:00
cpsw_priv.c net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account 2022-01-19 14:19:19 +00:00
cpsw_priv.h net: Add includes masked by netdevice.h including uapi/bpf.h 2021-12-29 20:03:05 -08:00
cpsw_sl.c
cpsw_sl.h
cpsw_switchdev.c net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge 2021-08-10 13:22:57 -07:00
cpsw_switchdev.h
cpts.c ethernet: ti: cpts: Use devm_kcalloc() instead of devm_kzalloc() 2021-10-07 09:08:43 -07:00
cpts.h net: ethernet: ti: cpts: add support for HW_TS_PUSH events 2020-04-23 12:50:21 -07:00
davinci_cpdma.c net: ethernet: ti: davinci_cpdma: revert "drop frame padding" 2021-08-06 16:18:15 -07:00
davinci_cpdma.h net: ethernet: ti: davinci_cpdma: revert "drop frame padding" 2021-08-06 16:18:15 -07:00
davinci_emac.c net: ethernet: ti: davinci_emac: Use platform_get_irq() to get the interrupt 2021-12-27 12:22:19 +00:00
davinci_mdio.c drivers: net: davinci_mdio: Use of_device_get_match_data() 2021-01-26 12:17:31 -06:00
k3-cppi-desc-pool.c net: ethernet: ti: fix return value check in k3_cppi_desc_pool_create_name() 2020-04-27 13:27:59 -07:00
k3-cppi-desc-pool.h
netcp.h
netcp_core.c ethernet: make use of eth_hw_addr_random() where appropriate 2021-10-14 09:22:15 -07:00
netcp_ethss.c net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
netcp_sgmii.c
netcp_xgbepcsr.c
tlan.c ethernet: tlan: use eth_hw_addr_set() 2021-10-20 11:41:01 +01:00
tlan.h