netdev_get_regs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netdev_get_regs β€” get register dump πŸ’…

okay bestie, welcome to the Kernel API Manual, section 9 β€” this one's a lil kernel function and it's short but it's iconic. let's get into it 🌸


🌸 NAME 🌸

netdev_get_regs β€” get register dump


✨ SYNOPSIS ✨

void netdev_get_regs (struct net_device *dev , struct ethtool_regs *regs
, void *ptr );

note the void up front bestie β€” this one hands you back literally nothing, it just does the thing. no return value, no notes, periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the network device. the main character of this whole situation 🫢
  • regs β€” the ethtool registers data structure. it's giving "the paperwork that says what we're dumping" ✨
  • ptr β€” the buffer where the register values get stored. this is where the goods actually land πŸ“₯

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it do? this procedure dumps the register values into the buffer you handed it (ptr). that's it. that's the whole vibe. it reads the registers and yeets them into your buffer. no cap, that's literally the entire job πŸ˜­πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

bestie. buckle up. this function is part of the ksz884x world, and the associated kernel file is ./drivers/net/ethernet/micrel/ksz884x.c β€” and the squad it rolls with is long. like, scroll-for-a-while long. but we do not skip, we do not summarise, we list every single one, fr fr 🫑

the structs first, because they ate:

  • struct ksz_hw_desc(9)
  • struct ksz_sw_desc(9)
  • struct ksz_dma_buf(9)
  • struct ksz_desc(9)
  • struct ksz_desc_info(9)
  • struct ksz_mac_table(9)
  • struct ksz_vlan_table(9)
  • struct ksz_port_mib(9)
  • struct ksz_port_cfg(9)
  • struct ksz_switch(9)
  • struct ksz_port_info(9)
  • struct ksz_hw(9)
  • struct ksz_port(9)
  • struct ksz_timer_info(9)
  • struct ksz_shared_mem(9)
  • struct ksz_counter_info(9)
  • struct dev_info(9)
  • struct dev_priv(9)

and now the functions, in the exact order they came in, no shuffling, no edits πŸ’œ

see? told you it was a whole friend group πŸ˜­πŸ’€


real talk though: this page is only about dumping register values into a buffer. it does not promise anything else, so don't go reading extra powers into it, bestie πŸ™ˆ

and that's the whole page, no crumbs left behind πŸ“ source/version line says it all comes from ./drivers/net/ethernet/micrel, dated October 2026 β€” mwah, mwah, we stan a documented kernel πŸ’–πŸ§šβœ¨

πŸ“¦ where this page comes from