xcan_current_error_state(9)
π 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 thenet_devicestructure. 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 forERROR_PASSIVEandERROR_WARNING. that's it. do not come for her expecting more, she is very clear about her scope and honestly? respect π
π RETURN π
ERROR_PASSIVEorERROR_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 π§
struct xcan_priv(9)xcan_write_reg_le(9)xcan_read_reg_le(9)xcan_write_reg_be(9)xcan_read_reg_be(9)xcan_rx_int_mask(9)set_reset_mode(9)xcan_set_bittiming(9)xcan_chip_start(9)xcan_do_set_mode(9)xcan_write_frame(9)xcan_start_xmit_fifo(9)xcan_start_xmit_mailbox(9)xcan_start_xmit(9)xcan_rx(9)xcanfd_rx(9)xcan_set_error_state(9)xcan_update_error_state_after_rxtx(9)xcan_err_interrupt(9)xcan_state_interrupt(9)xcan_rx_fifo_get_next_frame(9)xcan_rx_poll(9)xcan_tx_interrupt(9)xcan_interrupt(9)xcan_chip_stop(9)xcan_open(9)xcan_close(9)xcan_get_berr_counter(9)xcan_get_auto_tdcv(9)xcan_suspend(9)xcan_resume(9)xcan_runtime_suspend(9)xcan_runtime_resume(9)xcan_probe(9)xcan_remove(9)
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
- 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