]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/net/can/sja1000: fix bug for single acceptance filter and standard frame
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Wed, 3 Jan 2024 23:14:26 +0000 (00:14 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 5 Jan 2024 19:17:11 +0000 (22:17 +0300)
commit7b57e6d4340926b0a24853fb7d805bdaf8503eb2
tree4f2160ac01c60aea2585476e89e27d89b6f04fb0
parente649de10d509026343eb51159bd3791b5f9b11df
hw/net/can/sja1000: fix bug for single acceptance filter and standard frame

A CAN sja1000 standard frame filter mask has been computed and applied
incorrectly for standard frames when single Acceptance Filter Mode
(MOD_AFM = 1) has been selected. The problem has not been found
by Linux kernel testing because it uses dual filter mode (MOD_AFM = 0)
and leaves falters fully open.

The problem has been noticed by Grant Ramsay when testing with Zephyr
RTOS which uses single filter mode.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Reported-by: Grant Ramsay <gramsay@enphaseenergy.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2028
Fixes: 733210e754 ("hw/net/can: SJA1000 chip register level emulation")
Message-ID: <20240103231426.5685-1-pisa@fel.cvut.cz>
(cherry picked from commit 25145a7d7735344a469551946fc2a7f19eb4aa3d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/net/can/can_sja1000.c