STRUCT NETUP_DMA_REGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct netup_dma_regs(9) β€” the map of DMA module registers ✨

Okay so bestie, this is a page straight out of the Kernel API Manual and it's literally about one struct, but she's an important one, so let's get into it πŸŽ€


✨ NAME ✨

struct netup_dma_regs β€” the map of DMA module registers πŸ—ΊοΈπŸ’–

Like, it is the register map. That's the whole vibe. Not a driver, not a function, just the layout of every DMA module register laid out for you. Iconic honestly 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

struct netup_dma_regs {
    __le32 ctrlstat_set;
    __le32 ctrlstat_clear;
    __le32 start_addr_lo;
    __le32 start_addr_hi;
    __le32 size;
    __le32 timeout;
    __le32 curr_addr_lo;
    __le32 curr_addr_hi;
    __le32 stat_pkt_received;
    __le32 stat_pkt_accepted;
    __le32 stat_pkt_overruns;
    __le32 stat_pkt_underruns;
    __le32 stat_fifo_overruns;
 };

Every single one of those is a __le32, no cap, they all match, and the braces are lined up like they're posing for a photo πŸ“Έβœ¨


πŸ‘‘ Members πŸ‘‘

Let's do a vibe check on each field, one by one, no skipping, periodt 🫢

  • ctrlstat_set β€” the control register. You write to it to set control bits πŸ’…
  • ctrlstat_clear β€” also a control register, but this one you write to clear control bits. Same energy, opposite direction πŸ™ˆ
  • start_addr_lo β€” DMA ring buffer start address, the lower part 🧚
  • start_addr_hi β€” DMA ring buffer start address, the higher part. Yeah, the address is split in two, that's just how she rolls πŸ’œ
  • size β€” the DMA ring buffer size register. And this one is doing the most, so here's the breakdown:
    • Bits [0-7]: DMA packet size, 188 bytes πŸ“¦
    • Bits [16-23]: packets count in block, 128 packets πŸ”’
    • Bits [24-31]: blocks count, 8 blocks 🧱
  • timeout β€” DMA timeout, measured in units of 8ns ⏱️. For example, value of 375000000 equals to 3 sec. Math queen behavior, we love to see it ✨
  • curr_addr_lo β€” current ring buffer head address, the lower part 🌈
  • curr_addr_hi β€” current ring buffer head address, the higher part 🌈 (yes, again, split. consistency is a flex)
  • stat_pkt_received β€” statistic register, not tested πŸ“
  • stat_pkt_accepted β€” statistic register, not tested πŸ“
  • stat_pkt_overruns β€” statistic register, not tested πŸ“
  • stat_pkt_underruns β€” statistic register, not tested πŸ“
  • stat_fifo_overruns β€” statistic register, not tested πŸ“
πŸ’€ friendly heads-up bestie: every single one of those five stat_* registers is listed as not tested. So like, they exist, they're in the struct, but nobody's verified them. Don't come for me if you poke them and they act brand new, okay? 😭

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/media/pci/netup_unidvb/netup_unidvb_core.c β€” go read the actual source if you want the full lore, iykyk πŸ“–πŸ’«

Okay that's the whole page, short and sweet like a good text back πŸŽ€ The source for all this is ./drivers/media/pci/netup_unidvb and the version is dated October 2026, header struct netup_dma_regs(9) and all. Go off, read your registers, slay the ring buffer πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from