linux/drivers/net/ethernet
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
..
3com net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
8390 ethernet: 8390: remove unnecessary check of mem 2022-09-29 11:05:23 +02:00
actions net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
adaptec net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
adi net: ethernet: adi: adin1110: Fix notifiers 2022-10-28 21:54:21 -07:00
aeroflex net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
agere net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
alacritech net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
allwinner net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
alteon net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
altera net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
amazon net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
amd amd-xgbe: add the bit rate quirk for Molex cables 2022-10-21 22:40:22 -07:00
apm net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
apple
aquantia atlantic: fix deadlock at aq_nic_stop 2022-10-24 10:27:09 +01:00
arc net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
asix net: ax88796c: Use skb_put_data() instead of skb_put/memcpy pair 2022-09-29 09:37:29 +02:00
atheros Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-03 17:44:18 -07:00
broadcom net: broadcom: bcm4908_enet: update TX stats after actual transmission 2022-10-27 10:27:53 -07:00
brocade net: bna: Fix spelling mistake "muliple" -> "multiple" 2022-09-30 13:01:16 +01:00
cadence net: macb: Specify PHY PM management done by MAC 2022-10-20 21:12:00 -07:00
calxeda net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
cavium eth: octeon: fix build after netif_napi_add() changes 2022-10-03 17:03:25 -07:00
chelsio treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
cirrus net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
cisco net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
cortina net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
davicom net: davicom: Fix return type of dm9000_start_xmit 2022-09-19 18:23:14 -07:00
dec net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
dlink net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
emulex net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
engleder tsnep: Use page pool for RX 2022-09-30 11:32:27 +01:00
ezchip
faraday net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
freescale net: fec: fix improper use of NETDEV_TX_BUSY 2022-10-31 09:22:32 +00:00
fujitsu net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
fungible net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
google net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
hisilicon net: hns: fix possible memory leak in hnae_ae_register() 2022-10-19 17:28:52 -07:00
huawei net: hinic: fix the issue of double release MBOX callback of VF 2022-10-20 21:09:48 -07:00
i825xx
ibm net: ehea: fix possible memory leak in ehea_register_port() 2022-10-27 12:51:41 +02:00
intel i40e: Fix flow-type by setting GL_HASH_INSET registers 2022-10-25 16:18:32 -07:00
litex net: ethernet: litex: Fix return type of liteeth_start_xmit 2022-09-19 18:23:39 -07:00
marvell ethernet: marvell: octeontx2 Fix resource not freed after malloc 2022-10-19 13:43:41 +01:00
mediatek net: ethernet: mediatek: ppe: Remove the unused function mtk_foe_entry_usable() 2022-10-17 09:36:39 +01:00
mellanox net/mlx5e: Fix macsec sci endianness at rx sa update 2022-10-27 11:06:57 -07:00
micrel net: ksz884x: fix missing pci_disable_device() on error in pcidev_init() 2022-10-25 19:46:35 -07:00
microchip net: lan966x: Fix unmapping of received frames using FDMA 2022-11-01 21:20:30 -07:00
microsoft Including fixes from wifi, netfilter and can. 2022-09-22 10:58:13 -07:00
moxa net: moxa: fix endianness-related issues from 'sparse' 2022-09-06 10:24:42 +02:00
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
myricom net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
natsemi net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
neterion ethernet: s2io: Use skb_put_data() instead of skb_put/memcpy pair 2022-09-29 09:19:09 +02:00
netronome nfp: only clean sp_indiff when application firmware is unloaded 2022-10-21 22:43:48 -07:00
ni net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
nvidia net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
nxp net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
oki-semi net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
packetengines net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
pasemi net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
pensando ionic: catch NULL pointer issue on reconfig 2022-10-18 19:19:31 -07:00
qlogic net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
qualcomm net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
rdc net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
realtek r8169: add rtl_disable_rxdvgate() 2022-09-30 18:17:06 -07:00
renesas net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
rocker treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
samsung net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
seeq
sfc sfc: Fix an error handling path in efx_pci_probe() 2022-11-01 09:09:47 -07:00
sgi net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
silan
sis net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
smsc net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
socionext net: ethernet: ave: Fix MAC to be in charge of PHY PM 2022-10-26 20:21:34 -07:00
stmicro net: stmmac: rk3588: Allow multiple gmac controller 2022-10-25 11:02:37 +02:00
sun sunhme: Uninitialized variable in happy_meal_init() 2022-10-15 11:14:24 +01:00
sunplus Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-03 17:44:18 -07:00
synopsys net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
tehuti net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
ti net: ethernet: ti: am65-cpsw: set correct devlink flavour for unused ports 2022-10-12 09:05:04 +01:00
toshiba net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
tundra net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
vertexcom net: vertexcom: mse102x: Silence no spi_device_id warnings 2022-09-26 12:46:16 -07:00
via net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
wangxun net: ngbe: Add build support for ngbe 2022-08-30 12:32:51 +02:00
wiznet net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
xilinx net: emaclite: update reset_lock member documentation 2022-10-28 11:39:57 +01:00
xircom net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
xscale net: xscale: Fix return type for implementation of ndo_start_xmit 2022-09-02 21:18:56 -07:00
dnet.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
dnet.h
ec_bhf.c
ethoc.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
fealnx.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
jme.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
jme.h
Kconfig net: ethernet: adi: Add ADIN1110 support 2022-09-20 15:00:30 +02:00
korina.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
lantiq_etop.c net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY 2022-10-24 13:02:18 +01:00
lantiq_xrx200.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
Makefile net: ethernet: adi: Add ADIN1110 support 2022-09-20 15:00:30 +02:00