es58x_rx_err_msg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


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