qemu-patch-raspberry4/hw/net
Aaron Hill 88e1b59ee3 Set ENET_BD_BDU in I.MX FEC controller
This commit properly sets the ENET_BD_BDU flag once the emulated FEC controller
has finished processing the last descriptor. This is done for both transmit
and receive descriptors.

This allows the QNX 7.0.0 BSP for the Sabrelite board (which can be
found at http://blackberry.qnx.com/en/developers/bsp) to properly
control the FEC. Without this patch, the BSP ethernet driver will never
re-use FEC descriptors, as the unset ENET_BD_BDU flag will cause
it to believe that the descriptors are still in use by the NIC.

Note that Linux does not appear to use this field at all, and is
unaffected by this patch.

Without this patch, QNX will think that the NIC is still processing its
transaction descriptors, and won't send any more data over the network.

For reference:

On page 1192 of the I.MX 6DQ reference manual revision (Rev. 5, 06/2018),
which can be found at https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-6-processors/i.mx-6quad-processors-high-performance-3d-graphics-hd-video-arm-cortex-a9-core:i.MX6Q?&tab=Documentation_Tab&linkline=Application-Note

the 'BDU' field is described as follows for the 'Enhanced transmit
buffer descriptor':

'Last buffer descriptor update done. Indicates that the last BD data has been updated by
uDMA. This field is written by the user (=0) and uDMA (=1).'

The same description is used for the receive buffer descriptor.

Signed-off-by: Aaron Hill <aa1ronham@gmail.com>
Message-id: 20190805142417.10433-1-aaron.hill@alertinnovation.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-08-16 14:02:48 +01:00
..
can Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
fsl_etsec Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
rocker Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
allwinner_emac.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
cadence_gem.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
dp8393x.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
e1000.c e1000: don't raise interrupt in pre_save() 2019-07-29 16:29:30 +08:00
e1000_regs.h e1000: Rename the SEC symbol to SEQEC 2017-09-08 08:17:37 +08:00
e1000e.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
e1000e_core.c e1000e: Prevent MSI/MSI-X storms 2018-07-20 08:30:48 +08:00
e1000e_core.h Supply missing header guards 2019-06-12 13:20:21 +02:00
e1000x_common.c hw/net: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
e1000x_common.h Supply missing header guards 2019-06-12 13:20:21 +02:00
eepro100.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
etraxfs_eth.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ftgmac100.c ftgmac100: do not link to netdev 2019-07-02 10:21:06 +08:00
imx_fec.c Set ENET_BD_BDU in I.MX FEC controller 2019-08-16 14:02:48 +01:00
Kconfig hw/net/ne2000: Extract the PCI device from the chipset common code 2019-05-17 15:19:39 +02:00
lan9118.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
lance.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
Makefile.objs hw/net/ne2000: Extract the PCI device from the chipset common code 2019-05-17 15:19:39 +02:00
mcf_fec.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
milkymist-minimac2.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
mipsnet.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ne2000-isa.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ne2000-pci.c hw/net/ne2000: Extract the PCI device from the chipset common code 2019-05-17 15:19:39 +02:00
ne2000.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ne2000.h hw/net: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
net_rx_pkt.c net: Transmit zero UDP checksum as 0xFFFF 2017-11-20 11:08:00 +08:00
net_rx_pkt.h net_pkt: Extend packet abstraction as required by e1000e functionality 2016-06-02 10:42:28 +08:00
net_tx_pkt.c net: fix misaligned member access 2018-03-02 18:44:00 +00:00
net_tx_pkt.h clean-includes: run it once more 2016-06-16 18:39:03 +02:00
opencores_eth.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
pcnet-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
pcnet.c hw/net/pcnet: Use qemu_log_mask(GUEST_ERROR) instead of printf 2019-05-02 18:12:58 +02:00
pcnet.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
rtl8139.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
smc91c111.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
spapr_llan.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
stellaris_enet.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
sungem.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
sunhme.c sunhme: ensure that RX descriptor ring overflow is indicated to client driver 2019-07-02 22:49:08 +01:00
trace-events sunhme: ensure that RX descriptor ring overflow is indicated to client driver 2019-07-02 22:49:08 +01:00
vhost_net-stub.c vhost-net: move stubs to a separate file 2019-02-21 12:28:01 -05:00
vhost_net.c vhost_net: don't set backend for the uninitialized virtqueue 2019-05-17 17:00:12 +08:00
virtio-net.c net/announce: Add optional ID 2019-07-02 10:21:06 +08:00
vmware_utils.h hw/net/vmxnet3: Fix code to work on big endian hosts, too 2017-11-20 11:08:00 +08:00
vmxnet3.c hw/net: fix vmxnet3 live migration 2019-08-14 17:33:14 +01:00
vmxnet3.h hw/net/vmxnet3: Fix code to work on big endian hosts, too 2017-11-20 11:08:00 +08:00
vmxnet3_defs.h Supply missing header guards 2019-06-12 13:20:21 +02:00
vmxnet_debug.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
xen_nic.c xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00
xgmac.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
xilinx_axienet.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
xilinx_ethlite.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00