qemu/hw/net/can
Philippe Mathieu-Daudé 8729856c19 hw/net/can/xlnx-zynqmp: Avoid underflow while popping RX FIFO
Per https://docs.xilinx.com/r/en-US/ug1085-zynq-ultrascale-trm/Message-Format

  Message Format

  The same message format is used for RXFIFO, TXFIFO, and TXHPB.
  Each message includes four words (16 bytes). Software must read
  and write all four words regardless of the actual number of data
  bytes and valid fields in the message.

There is no mention in this reference manual about what the
hardware does when not all four words are read. To fix the
reported underflow behavior, I choose to fill the 4 frame data
registers when the first register (ID) is accessed, which is how
I expect hardware would do.

Reported-by: Qiang Liu <cyruscyliu@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Vikram Garhwal <vikram.garhwal@amd.com>
Message-id: 20231124183325.95392-3-philmd@linaro.org
Fixes: 98e5d7a2b7 ("hw/net/can: Introduce Xilinx ZynqMP CAN controller")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1427
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2023-11-27 15:27:38 +00:00
..
can_kvaser_pci.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
can_mioe3680_pci.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
can_pcm3680_pci.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
can_sja1000.c treewide: Remove the unnecessary space before semicolon 2022-10-24 13:41:10 +02:00
can_sja1000.h hw/net/can: Make CanBusClientInfo::can_receive() return a boolean 2020-03-31 21:14:35 +08:00
ctu_can_fd_frame.h net: Replace TAB indentations with spaces 2022-11-11 09:39:03 +01:00
ctu_can_fd_regs.h net: Replace TAB indentations with spaces 2022-11-11 09:39:03 +01:00
ctucan_core.c Remove unnecessary minimum_version_id_old fields 2022-01-28 15:38:23 +01:00
ctucan_core.h Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
ctucan_pci.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
trace-events hw/net/can: Introduce Xilinx Versal CANFD controller 2023-06-06 10:19:30 +01:00
trace.h hw/net/can: Introduce Xilinx ZynqMP CAN controller 2020-12-10 11:30:44 +00:00
xlnx-versal-canfd.c hw/net/can: Introduce Xilinx Versal CANFD controller 2023-06-06 10:19:30 +01:00
xlnx-zynqmp-can.c hw/net/can/xlnx-zynqmp: Avoid underflow while popping RX FIFO 2023-11-27 15:27:38 +00:00