OrangePi_CM5/drivers/net/ethernet
Sean Anderson 75ca7f44da net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD
[ Upstream commit 878e2405710aacfeeb19364c300f38b7a9abfe8f ]

There is a separate receive path for small packets (under 256 bytes).
Instead of allocating a new dma-capable skb to be used for the next packet,
this path allocates a skb and copies the data into it (reusing the existing
sbk for the next packet). There are two bytes of junk data at the beginning
of every packet. I believe these are inserted in order to allow aligned DMA
and IP headers. We skip over them using skb_reserve. Before copying over
the data, we must use a barrier to ensure we see the whole packet. The
current code only synchronizes len bytes, starting from the beginning of
the packet, including the junk bytes. However, this leaves off the final
two bytes in the packet. Synchronize the whole packet.

To reproduce this problem, ping a HME with a payload size between 17 and
214

	$ ping -s 17 <hme_address>

which will complain rather loudly about the data mismatch. Small packets
(below 60 bytes on the wire) do not have this issue. I suspect this is
related to the padding added to increase the minimum packet size.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220920235018.1675956-1-seanga2@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-09-28 11:10:37 +02:00
..
3com
8390 net:mcf8390: Use platform_get_irq() to get the interrupt 2022-04-08 14:39:48 +02:00
adaptec
aeroflex net: ethernet: aeroflex: fix UAF in greth_of_remove 2021-07-14 16:56:24 +02:00
agere
alacritech
allwinner
alteon
altera net: altera: Fix refcount leak in altera_tse_mdio_create 2022-06-14 18:32:41 +02:00
amazon net: ena: Fix error handling when calculating max IO queues number 2022-01-11 15:25:01 +01:00
amd net: amd-xgbe: disable interrupts during pci removal 2022-02-16 12:54:26 +01:00
apm drivers: net: xgene: Fix regression in CRC stripping 2022-03-28 09:57:09 +02:00
apple
aquantia net: atlantic: fix aq_vec index out of range error 2022-08-25 11:37:56 +02:00
arc net: arc: select CRC32 2021-10-20 11:45:03 +02:00
atheros net: ag71xx: Fix a potential double free in error handling paths 2022-01-05 12:40:31 +01:00
aurora
broadcom tg3: Disable tg3 device on system reboot to avoid triggering AER 2022-09-20 12:38:31 +02:00
brocade
cadence net: macb: Increment rx bd head after allocating skb and buffer 2022-05-25 09:17:57 +02:00
calxeda
cavium cavium: Fix return values of the probe function 2021-11-18 14:03:41 +01:00
chelsio tcp: Fix data-races around sysctl knobs related to SYN option. 2022-07-29 17:19:21 +02:00
cirrus
cisco
cortina net: Use u64_stats_fetch_begin_irq() for stats fetch. 2022-09-08 11:11:40 +02:00
davicom
dec ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one() 2022-05-25 09:18:00 +02:00
dlink
emulex be2net: Fix buffer overflow in be_get_module_eeprom 2022-07-29 17:19:20 +02:00
ezchip net: ethernet: ezchip: fix error handling 2021-07-14 16:56:24 +02:00
faraday net: ftgmac100: Hold reference returned by of_get_child_by_name() 2022-07-21 21:20:10 +02:00
freescale net: enetc: move enetc_set_psfp() out of the common enetc_set_features() 2022-09-28 11:10:35 +02:00
fujitsu
google net: Use u64_stats_fetch_begin_irq() for stats fetch. 2022-09-08 11:11:40 +02:00
hisilicon net: hns3: add return value for mailbox handling in PF 2022-05-09 09:05:04 +02:00
huawei net: Use u64_stats_fetch_begin_irq() for stats fetch. 2022-09-08 11:11:40 +02:00
i825xx lib82596: Fix IRQ check in sni_82596_probe 2022-01-27 10:54:36 +01:00
ibm ibmvnic: Properly dispose of all skbs during a failover. 2022-07-12 16:32:21 +02:00
intel i40e: Fix set max_tx_rate when it is lower than 1 Mbps 2022-09-28 11:10:33 +02:00
marvell octeontx2-pf: Forward error codes to VF 2022-02-01 17:25:45 +01:00
mediatek net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag 2022-06-22 14:13:15 +02:00
mellanox net/mlx5e: Properly disable vlan strip on non-UL reps 2022-08-31 17:15:16 +02:00
micrel Revert "net: micrel: fix KS8851_MLL Kconfig" 2022-04-27 13:53:58 +02:00
microchip lan743x: fix deadlock in lan743x_phy_link_status_change() 2021-12-01 09:19:06 +01:00
moxa net: moxa: get rid of asymmetry in DMA mapping/unmapping 2022-08-31 17:15:17 +02:00
mscc net: mscc: ocelot: allow unregistered IP multicast flooding 2022-07-02 16:39:25 +02:00
myricom myri10ge: fix an incorrect free for skb in myri10ge_sw_tso 2022-04-20 09:23:23 +02:00
natsemi natsemi: xtensa: fix section mismatch warnings 2021-12-08 09:03:23 +01:00
neterion ethernet: s2io: fix setting mac address during resume 2021-10-20 11:45:04 +02:00
netronome net: Use u64_stats_fetch_begin_irq() for stats fetch. 2022-09-08 11:11:40 +02:00
ni
nvidia
nxp net: ethernet: lpc_eth: Handle error for clk_enable 2022-03-16 14:15:58 +01:00
oki-semi net: pch_gbe: Use proper accessors to BE data in pch_ptp_match() 2021-07-19 09:44:37 +02:00
packetengines
pasemi
pensando ionic: fix up issues with handling EAGAIN on FW cmds 2022-08-31 17:15:21 +02:00
qlogic net/qla3xxx: Fix a test in ql_reset_work() 2022-05-25 09:17:58 +02:00
qualcomm net: qualcomm: fix QCA7000 checksum handling 2021-09-15 09:50:46 +02:00
rdc r6040: Restore MDIO clock frequency after MAC reset 2021-09-22 12:27:57 +02:00
realtek r8169: fix accessing unset transport header 2022-07-12 16:32:22 +02:00
renesas net: renesas: sh_eth: Fix freeing wrong tx descriptor 2021-09-22 12:28:06 +02:00
rocker ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler 2022-09-08 11:11:36 +02:00
samsung net: sxgbe: fix return value of __setup handler 2022-03-08 19:09:35 +01:00
seeq
sfc sfc: fix null pointer dereference in efx_hard_start_xmit 2022-09-28 11:10:33 +02:00
sgi net: sgi: ioc3-eth: check return value after calling platform_get_resource() 2021-07-19 09:44:49 +02:00
silan
sis sis900: Fix missing pci_disable_device() in probe and remove 2021-08-04 12:46:44 +02:00
smsc epic100: fix use after free on rmmod 2022-07-07 17:52:19 +02:00
socionext
stmicro stmmac: intel: Add a missing clk_disable_unprepare() call in intel_eth_pci_remove() 2022-08-25 11:38:09 +02:00
sun net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD 2022-09-28 11:10:37 +02:00
synopsys
tehuti
ti net: ethernet: ti: am65-cpsw-nuss: Fix some refcount leaks 2022-06-14 18:32:35 +02:00
toshiba
tundra
via
wiznet net: w5100: check return value after calling platform_get_resource() 2021-09-18 13:40:35 +02:00
xilinx net: emaclite: Don't advertise 1000BASE-T and do auto negotiation 2022-05-18 10:23:45 +02:00
xircom
xscale
Kconfig net: korina: select CRC32 2021-10-20 11:45:03 +02:00
Makefile
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq_xrx200: fix statistics of received bytes 2022-01-05 12:40:31 +01:00