es58x_get_urb_cmd_len(9)
π es58x_get_urb_cmd_len(9) β bestie edition
okay so this is a page from the Kernel API Manual and it's genuinely the shortest little function ever and honestly? iconic for that. it's es58x_get_urb_cmd_len, and the whole personality of this function is "math but make it USB." let's get into it π
β¨ NAME β¨
es58x_get_urb_cmd_len β literally just calculates the actual length of an urb command for a given message length. that's it. that's the whole vibe check. π
πΈ SYNOPSIS πΈ
size_t es58x_get_urb_cmd_len (struct es58x_device *es58x_dev , u16 msg_len );
she takes two things and she gives you back a size_t. no drama, no cap. β¨
π¦ ARGUMENTS π¦
es58x_devβ the ES58X device itself, your main character π«Άmsg_lenβ how long the message is. that's the input you're feeding her, bestie.
π DESCRIPTION π
okay so here's the whole thing: it adds the header and CRC lengths to the message length. that's the entire description. do not overthink it. the way that this is lowkey the most straightforward function in the whole driver π it's giving "I have one job and I do it."
heads up: those header and CRC lengths aren't parameters here β they come from the device, so don't go expecting to pass them in yourself π
β RETURN β
returns the length of the urb command. so like, the final number after the header and CRC got added in. slayed. π
π SEE ALSO π
this function does not roll alone β she has a whole friend group and you're gonna meet all of them:
Kernel file ./drivers/net/can/usb/etas_es58x/es58x_core.h
- 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_priv(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_netdev(9)es58x_get_raw_can_id(9)es58x_get_flags(9)
periodt. go read them, iykyk π
and that's the page, bestie β brought to you by the folks over in ./drivers/net/can/usb/etas_es58x, dated October 2026, filed under es58x_get_urb_cmd_len(9). mwah, go forth and compute your urb lengths correctly π§ββοΈπ
π¦ 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