hw/net/can/flexcan: Fix mailbox reset mask initialization
The mailbox reset mask initialized only the first word of the raw `mb[]` array. Fix the initialization to cover the whole mailbox, as indicated in the field description in the header. While at it, use the `mbs[]` view instead in order to drop the redundant and oversized `mb[]` view in the next commit. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Tested-by: Pavel Pisa <pisa@fel.cvut.cz> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-id: 20260723070059.6332-7-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Bernhard Beschow committed
Jul 27, 2026 at 10:28 UTC
7f780d9d2a125e61b9c741db96b1c7849ad42542
1 file changed
+5
-1
hw/net/can/flexcan.c
+5
-1
@@ -134,7 +134,11 @@ static const FlexcanRegs flexcan_regs_reset_mask = {
134
._reserved2 = 0,
135
.dbg1 = 0,
136
.dbg2 = 0,
137
- .mb = {0xFFFFFFFF},
137
+ .mbs = { [0 ... FLEXCAN_MAILBOX_COUNT - 1] = {
138
+ .can_ctrl = 0xFFFFFFFF,
139
+ .can_id = 0xFFFFFFFF,
140
+ .data = { 0xFFFFFFFF, 0xFFFFFFFF },
141
+ } },
142
._reserved4 = {0},
143
.rximr = {0xFFFFFFFF},
144
._reserved5 = {0},