pdc_send_data(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’Œ pdc_send_data โ€” the Kernel API Manual glow-up โœจ

okay so bestie, welcome to pdc_send_data(9) โ€” literally the page from the Kernel API Manual and it's all about that mailbox life ๐Ÿซถ


โœจ NAME โœจ

pdc_send_data โ€” the mailbox send_data function, no cap ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

int pdc_send_data (struct mbox_chan *chan , void *data );

that's it. that's the whole vibe. two args, one int back at ya ๐ŸŽ€


๐Ÿฆ‹ ARGUMENTS ๐Ÿฆ‹

  • chan โ€” the mailbox channel where the data gets sent, okay? and like, this channel corresponds to a DMA ringset. iykyk ๐Ÿ’ซ
  • data โ€” the actual mailbox message being sent. Important: the message must be a brcm_message structure. not optional, bestie, it's giving strict ๐Ÿ˜ญ

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so here's the tea โ˜• โ€” this function is registered as the send_data function for the mailbox controller. main character energy fr.

what it does, step by step, because the way that this works is iconic:

  1. from the destination scatterlist in the mailbox message, it creates a sequence of receive descriptors in the rx ring ๐ŸŒˆ
  2. from the source scatterlist, it creates a sequence of transmit descriptors in the tx ring ๐Ÿฆ‹
  3. after creating all those descriptors, it writes the rx ptr and tx ptr registers to initiate the DMA transfer ๐Ÿ”ฅ

and that's not even all of it โ€” this function also does the DMA map and unmap of the src and dst scatterlists in the mailbox message. doing the most, honestly ๐Ÿ‘‘


โญ RETURN โญ

  • 0 โ€” slayed, it worked, successful ๐Ÿ’…
  • -ENOTSUPP โ€” the mailbox message is a type this driver does not support, so... yeah, not supported ๐Ÿ™ˆ
  • < 0 โ€” an error happened, that's a mood killer for real ๐Ÿ˜ญ
ngl bestie, pay attention to the < 0 case โ€” that's the generic "something went wrong" bucket and you don't want to be in it.

๐Ÿ”ฎ SEE ALSO ๐Ÿ”ฎ

Kernel file ./drivers/mailbox/bcm-pdc-mailbox.c โ€” and honestly the whole friend group shows up here:

pdc_setup_debugfs(9), pdc_build_rxd(9), pdc_build_txd(9), pdc_receive_one(9), pdc_receive(9), pdc_tx_list_sg_add(9), pdc_tx_list_final(9), pdc_rx_list_init(9), pdc_rx_list_sg_add(9), pdc_irq_handler(9), pdc_work_cb(9), pdc_ring_init(9), pdc_desc_count(9), pdc_rings_full(9), pdc_last_tx_done(9), pdc_hw_init(9), pdc_hw_disable(9), pdc_rx_buf_pool_create(9), pdc_interrupts_init(9), pdc_mb_init(9), pdc_dt_read(9), pdc_probe(9)

like... the whole squad. go read them too, bestie ๐Ÿซถ


and that's the page!! sourced from ./drivers/mailbox, dated October 2026, and it's the pdc_send_data(9) era ๐ŸŒธโœจ bye bestie, go build some descriptors ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from