mpi3mr_map_data_buffer_dma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mpi3mr_map_data_buffer_dma(9) β€” like, the Kernel API Manual era πŸŽ€

okay bestie, buckle up, because this one is actually kind of the moment. we're in the Kernel API Manual, function mpi3mr_map_data_buffer_dma. yes the name is a mouthful, no you're not allowed to abbreviate it, it's giving "my parents named me after the whole alphabet" energy but we love her πŸ’–


✨ NAME ✨

mpi3mr_map_data_buffer_dma β€” build dma descriptors for data buffers. that's it, that's the whole job, she builds dma descriptors for data buffers and she does it well πŸ¦‹


🌸 SYNOPSIS 🌸

int mpi3mr_map_data_buffer_dma (struct mpi3mr_ioc *mrioc , struct
mpi3mr_buf_map *drv_buf , u16 desc_count );

look at her go. three args, returns an int, absolute main character energy πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • mrioc β€” the adapter instance reference. yep, your whole adapter, just vibing there as a pointer πŸ’…
  • drv_buf β€” the buffer map descriptor. this is the little map that says where stuff goes πŸ—ΊοΈ
  • desc_count β€” the number of dma descriptors that have already been consumed. key word: already. she's counting what's gone, not what's left πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” this function does two things and she's highkey good at both:

  1. she computes how many pre-allocated DMA descriptors are required for the given data buffer πŸ”₯
  2. and if that number of descriptors is free, she sets up the mapping of the scattered DMA address to the given data buffer ✨

and then, plot twist: if the data direction of the buffer is DMA_TO_DEVICE, the actual data gets copied over to the DMA buffers. not me being obsessed with a conditional πŸ’€ so basically: work out how many descriptors you need, check they're actually available, map the scattered DMA address onto the buffer, and copy the real data across when the direction is DMA_TO_DEVICE. literal icon behaviour 🧚


⭐ RETURN ⭐

  • 0 on success πŸŽ‰ (slay)
  • -1 on failure 😭 (not slay)

πŸ¦‹ SEE ALSO πŸ¦‹

bestie there are so many of these, and every single one ate, so we're listing them all. no skips, no cuts, we respect the whole family reunion πŸ‘‘


fr fr, that's the whole page. every flag, every function, every (9) β€” all present and accounted for 🫢

and that's a wrap bestie!! 🌈 this gem lives over in ./drivers/scsi/mpi3mr, dated October 2026, and honestly? iconic of her. go map those buffers, ily, bye πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from