STRUCT NETUP_DMA_REGS(9)
π
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 of375000000equals 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
- 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