can: xilinx_can: Fix missing Rx can packets on CANFD2.0
authorSrinivas Neeli <srinivas.neeli@xilinx.com>
Tue, 3 Dec 2019 12:16:36 +0000 (17:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:45:55 +0000 (16:45 +0100)
commita73cf89ae5c67a1ab5009f0acffb37c69efefdf4
tree766d17a7f9fd094d4721f3c43b96eaa696975337
parent90a7ae8add6076dcbf8aba7bbfdaf2cac28a8a22
can: xilinx_can: Fix missing Rx can packets on CANFD2.0

commit 9ab79b06ddf3cdf6484d60b3e5fe113e733145c8 upstream.

CANFD2.0 core uses BRAM for storing acceptance filter ID(AFID) and MASK
(AFMASK)registers. So by default AFID and AFMASK registers contain random
data. Due to random data, we are not able to receive all CAN ids.

Initializing AFID and AFMASK registers with Zero before enabling
acceptance filter to receive all packets irrespective of ID and Mask.

Fixes: 0db9071353a0 ("can: xilinx: add can 2.0 support")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Reviewed-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v5.0
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/xilinx_can.c