es58x_get_tx_urb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– es58x_get_tx_urb β€” like, grab yourself an URB for transmission ✨

Okay bestie, so this one is from the Kernel API Manual β€” yes, the actual kernel docs, we're being fancy today πŸŽ€ β€” and it's all about es58x_get_tx_urb. Think of it as the little handler that goes "hey, anybody got a free URB lying around?" so your ES58X device can actually send stuff. Slay. πŸ’…


🌸 NAME 🌸

es58x_get_tx_urb β€” get an URB for transmission. That's it, that's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct urb * es58x_get_tx_urb (struct es58x_device *es58x_dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • es58x_dev β€” the ES58X device in question. Your main character, basically. πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea β˜•: this function grabs an URB from the idle urbs anchor, or β€” if that anchor is literally empty β€” it goes and allocates a brand new one. Resourceful queen behavior, honestly. πŸ’…

And ngl, there's a little cleanup crew situation going on too: if there are more than ES58X_TX_URBS_MAX sitting in the idle anchor, it does some garbage collection. And the reason it happens here instead of inside es58x_write_bulk_callback is lowkey important, so listen up πŸ™ˆ β€” usb_free_coherent should not be used in IRQ context. Like, ever. The docs literally point you at WARN_ON(irqs_disabled) in dma_free_attrs to prove it. So this is us being responsible and doing the freeing somewhere safe. Periodt. 🫢


🌈 RETURN 🌈

On success you get a pointer to an URB πŸ’– β€” and if there's no memory available, you get NULL. Sad girl hours, but at least it's documented. 😭


⭐ SEE ALSO ⭐

Kernel file: ./drivers/net/can/usb/etas_es58x/es58x_core.c

And now the whole friend group, because the kernel devs really said "bring everybody" πŸ‘‘:

es58x_calculate_crc(9), es58x_get_crc(9), es58x_set_crc(9), es58x_check_crc(9), es58x_timestamp_to_ns(9), es58x_set_skb_timestamp(9), es58x_rx_timestamp(9), es58x_set_realtime_diff_ns(9), es58x_is_can_state_active(9), es58x_is_echo_skb_threshold_reached(9), es58x_can_free_echo_skb_tail(9), es58x_can_get_echo_skb_recovery(9), es58x_can_get_echo_skb(9), es58x_can_reset_echo_fifo(9), es58x_flush_pending_tx_msg(9), es58x_tx_ack_msg(9), es58x_rx_can_msg(9), es58x_rx_err_msg(9), es58x_cmd_ret_desc(9), es58x_rx_cmd_ret_u8(9), es58x_rx_cmd_ret_u32(9), es58x_increment_rx_errors(9), es58x_handle_urb_cmd(9), es58x_check_rx_urb(9), es58x_copy_to_cmd_buf(9), es58x_split_urb_try_recovery(9), es58x_handle_incomplete_cmd(9), es58x_split_urb(9), es58x_read_bulk_callback(9), es58x_write_bulk_callback(9), es58x_alloc_urb(9), es58x_submit_urb(9), es58x_send_msg(9), es58x_alloc_rx_urbs(9), es58x_free_urbs(9), es58x_open(9), es58x_stop(9), es58x_xmit_commit(9), es58x_xmit_more(9), es58x_start_xmit(9), es58x_set_mode(9), es58x_init_priv(9), es58x_init_netdev(9), es58x_free_netdevs(9), es58x_init_es58x_dev(9), es58x_probe(9), es58x_disconnect(9)


Bestie reminder 🫢: that NULL on no-memory is a real return value, not a vibe β€” check it before you dereference, iykyk. πŸ’€

And that's a wrap, my love πŸ’– This lil page lives in ./drivers/net/can/usb/etas_es58x, dated October 2026 in the Kernel API Manual β€” go forth and transmit responsibly, mwah 🧚🌟

πŸ“¦ where this page comes from