STRUCT ES58X_PRIV(9)
π struct es58x_priv(9) β bestie's guide to the private struct π
Okay so welcome to struct es58x_priv(9), the kernel API manual page that's literally all about one thing: the struct that holds every single thing specific to a CAN channel. Yes queen, the whole vibe of this page is "one channel, one struct, no cap" π
πΈ NAME πΈ
struct es58x_priv β All information specific to a CAN channel. That's it, that's the name, and she ate π
β¨ SYNOPSIS β¨
Here's the whole glow-up, character for character, because we do NOT paraphrase code in this house π«Ά
struct es58x_priv {
struct can_priv can;
struct devlink_port devlink_port;
struct es58x_device *es58x_dev;
struct urb *tx_urb;
u32 tx_tail;
u32 tx_head;
u8 tx_can_msg_cnt;
bool tx_can_msg_is_fd;
u8 err_passive_before_rtx_success;
u8 channel_idx;
};
π Members π
Okay this is the main character section, the member-by-member breakdown. Grab a snack π
canβ astruct can_privand it must be the first member. Why? Because Socket CAN relies on the fact that the functionnetdev_privreturns a pointer to astruct can_priv. So like, position matters, it's giving first-born energy πdevlink_portβ the devlink instance for the network interface. That's her whole job πββοΈes58x_devβ pointer to the corresponding ES58X device. Yep, just a pointer back home πtx_urbβ used as a buffer to concatenate the TX messages and to do a bulk send. Please refer toes58x_start_xmitfor more details, iykyk π₯tx_tailβ index of the oldest packet still pending for completion.tx_tail & echo_skb_maskrepresents the beginning of the echo skb FIFO, i.e. index of the first element. So basically the start of the queue, no cap π¦tx_headβ index of the next packet to be sent to the device.tx_head & echo_skb_maskrepresents the end of the echo skb FIFO plus one, i.e. the first free index. Slay, that's the next open seat πtx_can_msg_cntβ number of messages intx_urb. Simple, iconic, counting queen πtx_can_msg_is_fdβfalse: all messages intx_urbare Classical CAN,true: all messages intx_urbare CAN FD. And the rationale (yes she has lore): ES58X FD devices do not allow to mix Classical CAN and FD CAN frames in one single bulk transmission. So like, pick a lane bestie π«π§err_passive_before_rtx_successβ okay so the ES58X device might enter in a state in which it keeps alternating between error passive and active states. This counter keeps track of the number of error passive and if it gets bigger thanES58X_CONSECUTIVE_ERR_PASSIVE_MAX,es58x_rx_err_msgwill force the status to bus-off. Ma'am, that's a lot, but it's important π
Ngl, that last one is the dramatic member of the struct. She's out here flipping between states and if she goes past ES58X_CONSECUTIVE_ERR_PASSIVE_MAX it's straight to bus-off. The audacity π
channel_idxβ channel index, starts at zero. Zero-based indexing, periodt π―
π₯ SEE ALSO π₯
The whole friend group, linked below, and yes I'm listing every single one because we don't do "etc." in this group chat β¨
Kernel file ./drivers/net/can/usb/etas_es58x/es58x_core.h plus enum es58x_driver_info(9), enum es58x_physical_layer(9), enum es58x_sync_edge(9), enum es58x_flag(9), enum es58x_err(9), enum es58x_event(9), struct es58x_parameters(9), struct es58x_operators(9), struct es58x_sw_version(9), struct es58x_hw_revision(9), struct es58x_device(9), es58x_sizeof_es58x_device(9), es58x_check_msg_len(9), es58x_check_msg_max_len(9), es58x_msg_num_element(9), es58x_priv(9), ES58X_SIZEOF_URB_CMD(9), es58x_get_urb_cmd_len(9), es58x_get_netdev(9), es58x_get_raw_can_id(9), es58x_get_flags(9). Tag them all, they deserve it π«Άπ
π Cute little sign-off time π: this whole glow-up lives under./drivers/net/can/usb/etas_es58x, and the page itself is dated October 2026, with the manual name living its best life asstruct es58x_priv(9). Anyway, go reades58x_start_xmitand stay hydrated bestie π¦πβ
π¦ 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