es58x_rx_err_msg(9)
β¨ es58x_rx_err_msg(9) β¨
okay so bestie, welcome to the Kernel API Manual π
this one's all about es58x_rx_err_msg β the little function that handles CAN events and error messages for ES58X devices. no cap, it's giving main character energy in the error-handling department π
πΈ SYNOPSIS πΈ
int es58x_rx_err_msg (struct net_device *netdev , enum es58x_err error ,
enum es58x_event event , u64 timestamp );
like, there it is. iconic signature, periodt π
π¦ ARGUMENTS π¦
netdevβ the CAN network device. your main character πerrorβ the error code. yes, the error error code, iykyk πeventβ the event code. the vibe check of what just happened β¨timestampβ timestamp received from a ES58X device. clock it, bestie β°
π DESCRIPTION π
so what does this actually do? it handles the errors and events that the ES58X device sends over, creates a CAN error skb, and posts it. literally the whole job π«Ά
now here's the tea β in some rare cases the devices might get stuck alternating between CAN_STATE_ERROR_PASSIVE and CAN_STATE_ERROR_WARNING β like a toxic situationship between two states, no cap. to prevent this behavior, we force a bus off state if the device goes into CAN_STATE_ERROR_WARNING for ES58X_MAX_CONSECUTIVE_WARN consecutive times with no successful transmission or reception in between. that's the boundary being set, bestie π©
once the device is in bus off state, the only way to restart it is through the drivers/net/can/dev.c:can_restart function. the device is technically capable of recovering by itself under certain circumstances, however, allowing self recovery would create complex race conditions with drivers/net/can/dev.c:can_restart and thus was not implemented β so yeah, we not doing that π
ββοΈ to activate automatic restart, please set the restart-ms parameter, like this:
ip link set can0 type can restart-ms 100
if the bus is really instable, this function would try to send a lot of log messages. those are rate limited (i.e. you will see messages such as "net_ratelimit: XXX callbacks suppressed" in dmesg). so no, your dmesg isn't haunted, it's just doing its thing π
π RETURN π
zero on success, errno when any error occurs. that's it, that's the return. slay β¨
π SEE ALSO π
Kernel file ./drivers/net/can/usb/etas_es58x/es58x_core.c and literally the whole friend group:
es58x_calculate_crc(9),es58x_get_crc(9),es58x_set_crc(9),es58x_check_crc(9),es58x_timestamp_to_ns(9),es58x_set_skb_timestamp(9),es58x_rx_timestamp(9),es58x_set_realtime_diff_ns(9),es58x_is_can_state_active(9),es58x_is_echo_skb_threshold_reached(9),es58x_can_free_echo_skb_tail(9),es58x_can_get_echo_skb_recovery(9),es58x_can_get_echo_skb(9),es58x_can_reset_echo_fifo(9),es58x_flush_pending_tx_msg(9),es58x_tx_ack_msg(9),es58x_rx_can_msg(9),es58x_cmd_ret_desc(9),es58x_rx_cmd_ret_u8(9),es58x_rx_cmd_ret_u32(9),es58x_increment_rx_errors(9),es58x_handle_urb_cmd(9),es58x_check_rx_urb(9),es58x_copy_to_cmd_buf(9),es58x_split_urb_try_recovery(9),es58x_handle_incomplete_cmd(9),es58x_split_urb(9),es58x_read_bulk_callback(9),es58x_write_bulk_callback(9),es58x_alloc_urb(9),es58x_get_tx_urb(9),es58x_submit_urb(9),es58x_send_msg(9),es58x_alloc_rx_urbs(9),es58x_free_urbs(9),es58x_open(9),es58x_stop(9),es58x_xmit_commit(9),es58x_xmit_more(9),es58x_start_xmit(9),es58x_set_mode(9),es58x_init_priv(9),es58x_init_netdev(9),es58x_free_netdevs(9),es58x_init_es58x_dev(9),es58x_probe(9),es58x_disconnect(9)
and that's the whole page, bestie π«Ά brought to you by the ./drivers/net/can/usb/etas_es58x gang, dated October 2026, straight from the Kernel API Manual. go forth and handle those errors, you got this πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms