linux/drivers/net/ethernet/microchip
Horatiu Vultur fc57062f98 net: lan966x: Fix unmapping of received frames using FDMA
When lan966x was receiving a frame, then it was building the skb and
after that it was calling dma_unmap_single with frame size as the
length. This actually has 2 issues:
1. It is using a length to map and a different length to unmap.
2. When the unmap was happening, the data was sync for cpu but it could
   be that this will overwrite what build_skb was initializing.

The fix for these two problems is to change the order of operations.
First to sync the frame for cpu, then to build the skb and in the end to
unmap using the correct size but without sync the frame again for cpu.

Fixes: c834963932 ("net: lan966x: Add FDMA functionality")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20221031133421.1283196-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-11-01 21:20:30 -07:00
..
lan966x net: lan966x: Fix unmapping of received frames using FDMA 2022-11-01 21:20:30 -07:00
sparx5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-03 17:44:18 -07:00
Kconfig net: lan966x: add the basic lan966x driver 2021-11-29 12:58:38 +00:00
Makefile net: lan966x: add the basic lan966x driver 2021-11-29 12:58:38 +00:00
enc28j60.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
enc28j60_hw.h
encx24j600-regmap.c net: encx24j600: check error in devm_regmap_init_encx24j600 2021-10-13 15:25:25 -07:00
encx24j600.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
encx24j600_hw.h net: encx24j600: check error in devm_regmap_init_encx24j600 2021-10-13 15:25:25 -07:00
lan743x_ethtool.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
lan743x_ethtool.h net: lan743x: Add support to LAN743x register dump 2022-06-16 20:45:48 -07:00
lan743x_main.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
lan743x_main.h net: lan743x: Add support for Rx IP & TCP checksum offload 2022-09-09 08:20:58 +01:00
lan743x_ptp.c eth: lan743x: reject extts for non-pci11x1x devices 2022-10-03 12:39:39 +01:00
lan743x_ptp.h net: lan743x: Add support for PTP-IO Event Output (Periodic Output) 2022-03-18 12:53:23 +00:00