From: Marc Kleine-Budde Date: Thu, 5 Oct 2023 19:48:09 +0000 (+0200) Subject: Merge patch series "can: at91: add can_state_get_by_berr_counter() helper, cleanup... X-Git-Tag: v6.7-rc1~160^2~214^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf176313c62ec4f97daa893888aa4fde86749cb2;p=thirdparty%2Fkernel%2Flinux.git Merge patch series "can: at91: add can_state_get_by_berr_counter() helper, cleanup and convert to rx_offload" Marc Kleine-Budde says: This series first introduces the can_state_get_by_berr_counter() helper function. It returns the current TX and RX state depending on the provided CAN bit error counters. It will be later used by the at91_can driver. The remaining patches of this series first clean up the at91_can driver, clean up the bus- and line error (including bus-off) handling, and then convert it use the rx_offload helper. The driver works better under high system load and the order of received CAN frames is better maintained. Due to a hardware limitation the converted driver could trigger a race condition in the can_restart() CAN bus-off handler. The patch series [1] fixes the issue. [1] https://lore.kernel.org/all/20231005-can-dev-fix-can-restart-v2-0-91b5c1fd922c@pengutronix.de Changes in v2: - 1/27: can_state_err_to_state(): use symbolic error values instead of plain numbers (Thanks Vincent) - 27/27: fix patch description and typos (Thanks Vincent) - Link to v1: https://lore.kernel.org/all/20231004-at91_can-rx_offload-v1-0-c32bf99097db@pengutronix.de Link: https://lore.kernel.org/all/20231005-at91_can-rx_offload-v2-0-9987d53600e0@pengutronix.de Signed-off-by: Marc Kleine-Budde --- bf176313c62ec4f97daa893888aa4fde86749cb2