qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] hw/net/can/xlnx-versal-canfd: Miscellaneous fixes
@ 2024-08-16 16:35 Doug Brown
  2024-08-16 16:35 ` [PATCH 1/5] hw/net/can/xlnx-versal-canfd: Fix interrupt level Doug Brown
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Doug Brown @ 2024-08-16 16:35 UTC (permalink / raw)
  To: Vikram Garhwal, Francisco Iglesias, Pavel Pisa
  Cc: Jason Wang, qemu-devel, Doug Brown

This series fixes several problems I ran into while trying to simulate
the AMD/Xilinx Versal CANFD controller in the xlnx-versal-virt machine
using Xilinx's v6.6_LTS_2024.1 kernel. With all of these patches
applied, everything works correctly alongside actual CAN devices.

- IRQs were accidentally not being delivered due to having a level other
  than 1. The IRQ count in /proc/interrupts in Linux was stuck at 0.
- Incoming CAN FD frames were being treated as non-FD.
- The CAN IDs were garbled in both RX and TX directions.
- The byte ordering was wrong in the data in both directions.
- Incoming CAN FD frames with DLC = 1-7 weren't handled correctly.

I don't have any actual Versal hardware to compare behavior against, but
with these changes, it plays nicely with SocketCAN on the host system.

Doug Brown (5):
  hw/net/can/xlnx-versal-canfd: Fix interrupt level
  hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check
  hw/net/can/xlnx-versal-canfd: Translate CAN ID registers
  hw/net/can/xlnx-versal-canfd: Fix byte ordering
  hw/net/can/xlnx-versal-canfd: Handle RX of short FD frames

 hw/net/can/xlnx-versal-canfd.c | 82 +++++++++++++++++++++++++++-------
 1 file changed, 67 insertions(+), 15 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-08-25 21:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-16 16:35 [PATCH 0/5] hw/net/can/xlnx-versal-canfd: Miscellaneous fixes Doug Brown
2024-08-16 16:35 ` [PATCH 1/5] hw/net/can/xlnx-versal-canfd: Fix interrupt level Doug Brown
2024-08-21  7:30   ` Francisco Iglesias
2024-08-16 16:35 ` [PATCH 2/5] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check Doug Brown
2024-08-21  6:57   ` Pavel Pisa
2024-08-22  0:01     ` Doug Brown
2024-08-22  1:11       ` Pavel Pisa
2024-08-24  1:54         ` Doug Brown
2024-08-25 16:50           ` Pavel Pisa
2024-08-25 17:30           ` Peter Maydell
2024-08-25 21:21             ` Doug Brown
2024-08-21  7:33   ` Francisco Iglesias
2024-08-16 16:35 ` [PATCH 3/5] hw/net/can/xlnx-versal-canfd: Translate CAN ID registers Doug Brown
2024-08-23 17:08   ` Francisco Iglesias
2024-08-16 16:35 ` [PATCH 4/5] hw/net/can/xlnx-versal-canfd: Fix byte ordering Doug Brown
2024-08-23 17:52   ` Francisco Iglesias
2024-08-16 16:35 ` [PATCH 5/5] hw/net/can/xlnx-versal-canfd: Handle RX of short FD frames Doug Brown
2024-08-23 18:11   ` Francisco Iglesias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).