[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/39] hw/net/can: fix Xilinx ZynqMP CAN RX FIFO logic
From: |
Peter Maydell |
Subject: |
[PULL 01/39] hw/net/can: fix Xilinx ZynqMP CAN RX FIFO logic |
Date: |
Thu, 22 Sep 2022 17:34:58 +0100 |
From: Anton Kochkov <anton.kochkov@proton.me>
For consistency, function "update_rx_fifo()" should use the RX FIFO
register field names, not the TX FIFO ones, even if they refer to the
same bit positions in the register.
Signed-off-by: Anton Kochkov <anton.kochkov@proton.me>
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Message-id: 20220817141754.2105981-1-anton.kochkov@proton.me
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1123
[PMM: tweaked commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/net/can/xlnx-zynqmp-can.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c
index 82ac48cee24..e93e6c5e194 100644
--- a/hw/net/can/xlnx-zynqmp-can.c
+++ b/hw/net/can/xlnx-zynqmp-can.c
@@ -696,30 +696,30 @@ static void update_rx_fifo(XlnxZynqMPCANState *s, const
qemu_can_frame *frame)
timestamp));
/* First 32 bit of the data. */
- fifo32_push(&s->rx_fifo, deposit32(0, R_TXFIFO_DATA1_DB3_SHIFT,
- R_TXFIFO_DATA1_DB3_LENGTH,
+ fifo32_push(&s->rx_fifo, deposit32(0, R_RXFIFO_DATA1_DB3_SHIFT,
+ R_RXFIFO_DATA1_DB3_LENGTH,
frame->data[0]) |
- deposit32(0, R_TXFIFO_DATA1_DB2_SHIFT,
- R_TXFIFO_DATA1_DB2_LENGTH,
+ deposit32(0, R_RXFIFO_DATA1_DB2_SHIFT,
+ R_RXFIFO_DATA1_DB2_LENGTH,
frame->data[1]) |
- deposit32(0, R_TXFIFO_DATA1_DB1_SHIFT,
- R_TXFIFO_DATA1_DB1_LENGTH,
+ deposit32(0, R_RXFIFO_DATA1_DB1_SHIFT,
+ R_RXFIFO_DATA1_DB1_LENGTH,
frame->data[2]) |
- deposit32(0, R_TXFIFO_DATA1_DB0_SHIFT,
- R_TXFIFO_DATA1_DB0_LENGTH,
+ deposit32(0, R_RXFIFO_DATA1_DB0_SHIFT,
+ R_RXFIFO_DATA1_DB0_LENGTH,
frame->data[3]));
/* Last 32 bit of the data. */
- fifo32_push(&s->rx_fifo, deposit32(0, R_TXFIFO_DATA2_DB7_SHIFT,
- R_TXFIFO_DATA2_DB7_LENGTH,
+ fifo32_push(&s->rx_fifo, deposit32(0, R_RXFIFO_DATA2_DB7_SHIFT,
+ R_RXFIFO_DATA2_DB7_LENGTH,
frame->data[4]) |
- deposit32(0, R_TXFIFO_DATA2_DB6_SHIFT,
- R_TXFIFO_DATA2_DB6_LENGTH,
+ deposit32(0, R_RXFIFO_DATA2_DB6_SHIFT,
+ R_RXFIFO_DATA2_DB6_LENGTH,
frame->data[5]) |
- deposit32(0, R_TXFIFO_DATA2_DB5_SHIFT,
- R_TXFIFO_DATA2_DB5_LENGTH,
+ deposit32(0, R_RXFIFO_DATA2_DB5_SHIFT,
+ R_RXFIFO_DATA2_DB5_LENGTH,
frame->data[6]) |
- deposit32(0, R_TXFIFO_DATA2_DB4_SHIFT,
- R_TXFIFO_DATA2_DB4_LENGTH,
+ deposit32(0, R_RXFIFO_DATA2_DB4_SHIFT,
+ R_RXFIFO_DATA2_DB4_LENGTH,
frame->data[7]));
ARRAY_FIELD_DP32(s->regs, INTERRUPT_STATUS_REGISTER, RXOK, 1);
--
2.25.1
- [PULL 34/39] configure: Remove unused meson_args variable, (continued)
- [PULL 34/39] configure: Remove unused meson_args variable, Peter Maydell, 2022/09/22
- [PULL 39/39] configure: Avoid use of 'local' as it is non-POSIX, Peter Maydell, 2022/09/22
- [PULL 33/39] configure: Remove unused python_version variable, Peter Maydell, 2022/09/22
- [PULL 02/39] target/arm: Fix alignment for VLD4.32, Peter Maydell, 2022/09/22
- [PULL 11/39] target/arm: Remove is_subpage argument to pmsav8_mpu_lookup, Peter Maydell, 2022/09/22
- [PULL 08/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav7, Peter Maydell, 2022/09/22
- [PULL 04/39] target/arm: Use GetPhysAddrResult in get_phys_addr_lpae, Peter Maydell, 2022/09/22
- [PULL 09/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8, Peter Maydell, 2022/09/22
- [PULL 12/39] target/arm: Add is_secure parameter to v8m_security_lookup, Peter Maydell, 2022/09/22
- [PULL 16/39] target/arm: Add secure parameter to get_phys_addr_pmsav8, Peter Maydell, 2022/09/22
- [PULL 01/39] hw/net/can: fix Xilinx ZynqMP CAN RX FIFO logic,
Peter Maydell <=
- [PULL 31/39] ui/curses: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 10/39] target/arm: Use GetPhysAddrResult in pmsav8_mpu_lookup, Peter Maydell, 2022/09/22
- [PULL 32/39] tests/unit/test-vmstate: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 21/39] hw/net/lan9118: Signal TSFL_INT flag when TX FIFO reaches specified level, Peter Maydell, 2022/09/22
- [PULL 23/39] chardev/baum: Use definitions to avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 28/39] hw/intc/xics: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 18/39] target/arm: Add secure parameter to get_phys_addr_pmsav7, Peter Maydell, 2022/09/22
- [PULL 30/39] hw/usb/hcd-ohci: Use definition to avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 25/39] io/channel-websock: Replace strlen(const_str) by sizeof(const_str) - 1, Peter Maydell, 2022/09/22
- [PULL 24/39] chardev/baum: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22