es58x_is_can_state_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… es58x_is_can_state_active πŸ’…

okay bestie, welcome to the <cyan>Kernel API Manual</cyan> page for es58x_is_can_state_active β€” yes that's a mouthful, we love her anyway 🫢


✨ NAME ✨

es58x_is_can_state_active β€” literally just asking: is this network device in an active CAN state? that's the whole vibe check πŸ”₯


🌸 SYNOPSIS 🌸

bool es58x_is_can_state_active (struct net_device *netdev );

πŸŽ€ ARGUMENTS πŸŽ€

  • netdev β€” the CAN network device. that's it, that's the whole argument, she's low maintenance πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

so the device counts as active if it can actually send or receive CAN frames β€” like, if it's in any one of these states:

  • CAN_STATE_ERROR_ACTIVE
  • CAN_STATE_ERROR_WARNING
  • CAN_STATE_ERROR_PASSIVE

those three, and only those three. iykyk ✨

πŸ’€ Caution, fr fr: when recovering from a bus-off, net/core/dev.c#can_restart will call net/core/dev.c#can_flush_echo_skb without using any kind of locks. so it is critical to guarantee that no TX or echo operations (i.e. any access to priv->echo_skb[]) can be done while this function is returning false. like. do not do that. not even a little. 😭

⭐ RETURN ⭐

returns true if the device is active, else returns false. iconic behaviour, no notes πŸŽ€


πŸ¦‹ SEE ALSO πŸ¦‹

kernel file: ./drivers/net/can/usb/etas_es58x/es58x_core.c

and the whole bestie squad:


and that's the page!! 🧚 this lil beauty lives in ./drivers/net/can/usb/etas_es58x, dated October 2026, and yes she's still shipping as es58x_is_can_state_active(9). mwah πŸ’– periodt.

πŸ“¦ where this page comes from