qemu-e2k/hw
Niek Linnenbank b6f03acc8f hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value
Currently the emulated EMAC for sun8i always traverses the transmit queue
from the head when transferring packets. It searches for a list of consecutive
descriptors whichs are flagged as ready for processing and transmits their payloads
accordingly. The controller stops processing once it finds a descriptor that is not
marked ready.

While the above behaviour works in most situations, it is not the same as the actual
EMAC in hardware. Actual hardware uses the TX_CUR_DESC register value to keep track
of the last position in the transmit queue and continues processing from that position
when software triggers the start of DMA processing. The currently emulated behaviour can
lead to packet loss on transmit when software fills the transmit queue with ready
descriptors that overlap the tail of the circular list.

This commit modifies the emulated EMAC for sun8i such that it processes
the transmit queue using the TX_CUR_DESC register in the same way as hardware.

Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210310195820.21950-2-nieklinnenbank@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-03-12 12:40:10 +00:00
..
9pfs qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
acpi acpi/core: always set SCI_EN when SMM isn't supported 2021-02-23 10:58:42 -05:00
adc clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
alpha
arm hw/arm/smmuv3: Uniformize sid traces 2021-03-12 12:40:10 +00:00
audio
avr
block Pull request 2021-03-11 18:55:27 +00:00
char Pull request 2021-03-11 18:55:27 +00:00
core Testing, guest-loader and other misc tweaks 2021-03-11 16:20:58 +00:00
cpu
cris
display sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
dma target-arm queue: 2021-03-10 13:57:31 +00:00
gpio
hppa
hyperv
i2c hw/i2c/npcm7xx_smbus: Simplify npcm7xx_smbus_init() 2021-03-05 15:17:34 +00:00
i386 dma: Introduce dma_aligned_pow2_mask() 2021-03-12 12:40:10 +00:00
ide sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
input
intc sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
ipack
ipmi
isa acpi/core: always set SCI_EN when SMM isn't supported 2021-02-23 10:58:42 -05:00
lm32 hw/lm32/Kconfig: Have MILKYMIST select LM32_DEVICES 2021-03-09 22:37:08 +01:00
m68k esp: rename existing ESP QOM type to SYSBUS_ESP 2021-03-07 10:39:05 +00:00
mem nvdimm: put it into the 'storage' category 2021-02-20 12:36:19 +01:00
microblaze
mips Testing, guest-loader and other misc tweaks 2021-03-11 16:20:58 +00:00
misc hw/misc: versal: Add a model of the XRAM controller 2021-03-12 12:40:09 +00:00
moxie
net hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value 2021-03-12 12:40:10 +00:00
nios2
nubus
nvram sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
openrisc
pci hw/pci: Have safer pcie_bus_realize() by checking error path 2021-03-02 09:16:18 -05:00
pci-bridge
pci-host hw/pci-host: Introduce SH_PCI Kconfig entry 2021-03-06 16:18:42 +01:00
pcmcia
ppc Pull request 2021-03-11 18:55:27 +00:00
rdma
remote multi-process: perform device reset in the remote process 2021-02-10 09:23:28 +00:00
riscv Testing, guest-loader and other misc tweaks 2021-03-11 16:20:58 +00:00
rtc goldfish_rtc: re-arm the alarm after migration 2021-03-04 09:43:29 -05:00
rx qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
s390x sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
scsi sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
sd Pull request trivial patches 20210220 2021-02-21 12:12:18 +00:00
sh4 hw/sh4/sh7750_regs: Replace link to license by its full content 2021-03-06 16:19:03 +01:00
smbios
sparc esp: rename existing ESP QOM type to SYSBUS_ESP 2021-03-07 10:39:05 +00:00
sparc64
ssi hw/ssi: xilinx_spips: Remove DMA related dead codes from zynqmp_spips 2021-03-10 13:54:51 +00:00
timer Pull request 2021-03-11 18:55:27 +00:00
tpm tpm: put some tpm devices into the correct category 2021-02-20 12:36:19 +01:00
tricore
unicore32
usb sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
vfio sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
virtio virtio-iommu: Handle non power of 2 range invalidations 2021-03-12 12:40:10 +00:00
watchdog clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
xen pci: add romsize property 2021-02-05 08:52:58 -05:00
xenpv
xtensa
Kconfig semihosting: Move hw/semihosting/ -> semihosting/ 2021-03-10 15:34:12 +00:00
meson.build semihosting: Move hw/semihosting/ -> semihosting/ 2021-03-10 15:34:12 +00:00