This series attempts to fix the Coveriy issues pointed out by Peter in the
FlexCAN emulation [1]. In addition, it fixes some reset masks to preserve
register contents across resets as intended. It also fixes some register
offsets due to a union being inadvertantly too large; this would affect
migration if addressed after the release. Last but not least it eliminates an
unneeded union.

Testing done:
* `make check`
* Run `cangen` and `candump` on the host and guest in both directions

[1] 
https://lore.kernel.org/qemu-devel/cafeaca-qbipfgn4yjxd9fqulobpbvngejhsqg7eqg1czykt...@mail.gmail.com/

Bernhard Beschow (9):
  hw/net/can/flexcan: Use mbs[] array for FIFO pop
  hw/net/flexcan: Drop unused RX FIFO register overlay
  hw/net/can/flexcan: Fix out-of-bounds access in flexcan_mx_rx()
  hw/net/can/flexcan: Fix mailbox index calculation in
    flexcan_mem_write()
  hw/net/can/flexcan: Fix mailbox index calculation in
    flexcan_mem_read()
  hw/net/can/flexcan: Fix mailbox reset mask initialization
  hw/net/flexcan: Drop oversized 'mb[]' mailbox view
  hw/net/can/flexcan: Fix RXIMR reset mask
  hw/net/can/flexcan: Remove RX SMB raw view

 include/hw/net/flexcan.h | 22 +++----------------
 hw/net/can/flexcan.c     | 47 ++++++++++++++++++++++++----------------
 2 files changed, 31 insertions(+), 38 deletions(-)

-- 
2.55.0


Reply via email to