xcan_set_error_state(9)
β¨ xcan_set_error_state β¨ (kernel API manual, section 9)
okay so bestie, we're in the kernel API manual (section 9) and this little icon is called xcan_set_error_state β say it with me, it's giving "let me just quietly fix the vibe of this CAN device" π
πΈ SYNOPSIS πΈ
void xcan_set_error_state (struct net_device *ndev , enum can_state
new_state , struct can_frame *cf );
like, it returns nothing (void) and it takes three things. that's it. that's the whole entrance exam π
π ARGUMENTS π
ndevβ a pointer to thenet_devicestructure. your actual device, your main character π«Άnew_stateβ the new CAN state to be set. it's anenum can_state, so like, pick a state, any state β¨cfβ the error frame to be populated, orNULL. yes queen,NULLis allowed, it's optional and we respect that π
π¦ DESCRIPTION π¦
so what does it actually do? it sets a new CAN error state for the device. while it's at it, it also updates the statistics and populates the error frame β but only if you actually gave it one (cf). no frame, no populating. simple as that π
β SEE ALSO β
literally the whole friend group, no cap. if you're gonna hang out with xcan_set_error_state, you're gonna meet all of these:
- the kernel file
./drivers/net/can/xilinx_can.candstruct 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_current_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)
and that's the whole page, bestie π§ no notes, ate and left no crumbs π
k byeee, this one lives in ./drivers/net/can and it's dated October 2026 β so like, it's from the future, iconic behavior honestly ππ
π¦ 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