xcan_current_error_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xcan_current_error_state β€” the Kernel API Manual bestie 🫢

okay so you found the manual page for xcan_current_error_state(9), and honestly? it's a little guy with one job and it does it slayfully. it lives in the Kernel API Manual, and we're gonna go through it together, no cap ✨


🌸 NAME 🌸

xcan_current_error_state β€” get the current error state from the HW, periodt πŸ’…


⭐ SYNOPSIS ⭐

enum can_state xcan_current_error_state (struct net_device *ndev );

that's it. that's the whole signature. she's compact, she's iconic, she returns an enum can_state and takes exactly one friend πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ndev β€” a pointer to the net_device structure. that's the whole thing, bestie, just hand her the net_device pointer and she's good πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so what she actually does: she checks the current CAN error state straight from the HW β€” like, she goes and asks the hardware directly, main character energy, no middleman πŸ™ˆ

⚠️ but listen, this is the important part β€” she only checks for ERROR_PASSIVE and ERROR_WARNING. that's it. do not come for her expecting more, she is very clear about her scope and honestly? respect πŸ’€

πŸ‘‘ RETURN πŸ‘‘

  • ERROR_PASSIVE or ERROR_WARNING β€” if either one of those is active, that's what you get back πŸ’œ
  • ERROR_ACTIVE β€” otherwise. the chill default. the "we're fine" state 🌈

✨ SEE ALSO ✨

the whole friend group, fr fr β€” every one of these is part of the same Xilinx CAN saga, and they all live in the kernel file ./drivers/net/can/xilinx_can.c 🧚

like, the entire roster. go read them, they're all lowkey important πŸ’–


and that's the page!! go forth and check your error states, bestie πŸ¦‹

signing off from ./drivers/net/can, dated October 2026 β€” this version of the page is officially wrapped, mwah πŸ’‹

πŸ“¦ where this page comes from