aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_prog_array_init.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <[email protected]>2023-12-10 14:43:14 +0100
committerMarc Kleine-Budde <[email protected]>2024-09-04 14:41:53 +0200
commit7ba7111b5f9e754e21ea508754c43238c5528c3d (patch)
treecce1d3cf3b8181373f8276249b8a316597b1d53f /tools/testing/selftests/bpf/progs/test_prog_array_init.c
parent83f9bd6bf39de5865372d45edbe0cf7b19c285c5 (diff)
can: rockchip_canfd: rkcanfd_get_berr_counter_corrected(): work around broken {RX,TX}ERRORCNT register
Tests show that sometimes both CAN bus error counters read 0x0, even if the controller is in warning mode (RKCANFD_REG_STATE_ERROR_WARNING_STATE in RKCANFD_REG_STATE set). To work around this issue, if both error counters read from hardware are 0x0, use the structure priv->bec, otherwise save the read value in priv->bec. In rkcanfd_handle_rx_int_one() decrement the priv->bec.rxerr for successfully RX'ed CAN frames. In rkcanfd_handle_tx_done_one() decrement the priv->bec.txerr for successfully TX'ed CAN frames. Tested-by: Alibek Omarov <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_prog_array_init.c')
0 files changed, 0 insertions, 0 deletions