Commit 3d9db29
committed
can: m_can: m_can_handle_state_errors(): fix CAN state transition to Error Active
The CAN Error State is determined by the receive and transmit error
counters. The CAN error counters decrease when reception/transmission
is successful, so that a status transition back to the Error Active
status is possible. This transition is not handled by
m_can_handle_state_errors().
Add the missing detection of the Error Active state to
m_can_handle_state_errors() and extend the handling of this state in
m_can_handle_state_change().
Fixes: e0d1f48 ("can: m_can: add Bosch M_CAN controller support")
Fixes: cd0d83e ("can: m_can: m_can_handle_state_change(): fix state change")
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://patch.msgid.link/20250929-m_can-fix-state-handling-v4-2-682b49b49d9a@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>1 parent ba569fb commit 3d9db29
1 file changed
+32
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
815 | 818 | | |
816 | 819 | | |
817 | 820 | | |
| |||
841 | 844 | | |
842 | 845 | | |
843 | 846 | | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
844 | 853 | | |
845 | 854 | | |
846 | 855 | | |
| |||
877 | 886 | | |
878 | 887 | | |
879 | 888 | | |
880 | | - | |
| 889 | + | |
| 890 | + | |
881 | 891 | | |
882 | | - | |
883 | | - | |
| 892 | + | |
884 | 893 | | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
| 894 | + | |
890 | 895 | | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
896 | 902 | | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
| 903 | + | |
| 904 | + | |
902 | 905 | | |
903 | | - | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
904 | 916 | | |
905 | 917 | | |
906 | 918 | | |
| |||
1031 | 1043 | | |
1032 | 1044 | | |
1033 | 1045 | | |
1034 | | - | |
1035 | | - | |
| 1046 | + | |
1036 | 1047 | | |
1037 | 1048 | | |
1038 | 1049 | | |
| |||
0 commit comments