STRUCT ARC_EMAC_PRIV(9)
๐ NAME ๐
struct arc_emac_priv โ the lil' storage locker where EMAC keeps all its private info ๐ (yes bestie, this is from the Kernel API Manual, struct arc_emac_priv(9), and we're gonna get through it together)
โจ SYNOPSIS โจ
Okay so here's the whole struct, copy-pasted exactly, no cap โ every field, in order, don't @ me:
struct arc_emac_priv {
const char *drv_name;
void (*set_mac_speed)(void *priv, unsigned int speed);
struct device *dev;
struct mii_bus *bus;
struct arc_emac_mdio_bus_data bus_data;
void __iomem *regs;
struct clk *clk;
struct napi_struct napi;
struct arc_emac_bd *rxbd;
struct arc_emac_bd *txbd;
dma_addr_t rxbd_dma;
dma_addr_t txbd_dma;
struct buffer_state rx_buff[RX_BD_NUM];
struct buffer_state tx_buff[TX_BD_NUM];
unsigned int txbd_curr;
unsigned int txbd_dirty;
unsigned int last_rx_bd;
unsigned int link;
unsigned int duplex;
unsigned int speed;
unsigned int rx_missed_errors;
};
not every field below got its own little write-up in the Members list โ that's just how the page is, we're not inventing lore ๐ฎ
๐ฆ Members ๐ฆ
devโ pointer to the current device ๐ซถ like, the device we're living in rn.busโ pointer to the current MII bus ๐ (MII bus, not school bus, but same energy).regsโ base address of the EMAC memory-mapped control registers ๐ this is where the knobs live.napiโ structure for NAPI โก the whole NAPI situation, structurally speaking.rxbdโ pointer to the Rx BD ring ๐ซ receive ring, iconic.txbdโ pointer to the Tx BD ring ๐ซ transmit ring, equally iconic.rxbd_dmaโ DMA handle for the Rx BD ring ๐ง the handle, specifically.txbd_dmaโ DMA handle for the Tx BD ring ๐ง same but for Tx, periodt.rx_buffโ storage for Rx buffer states ๐ where the receive buffers keep their state.tx_buffโ storage for Tx buffer states ๐ and where the transmit buffers keep theirs.txbd_currโ index of the Tx BD to use on the next"ndo_start_xmit"๐ฅ yes it literally quotes it like that, we love a namedrop.txbd_dirtyโ index of the Tx BD to free on the next Tx interrupt ๐งน cleanup duties, someone's gotta do 'em.last_rx_bdโ index of the last Rx BD we've got from EMAC ๐ last seen energy.linkโ PHY's last seen link state ๐ lowkey a vibe check on the link.duplexโ PHY's last set duplex mode ๐ half or full, the PHY decided.speedโ PHY's last set speed ๐จ fast girl, whatever the PHY set.
๐ธ SEE ALSO ๐ธ
- Kernel file
./drivers/net/ethernet/arc/emac.h struct arc_emac_bd(9)struct buffer_state(9)arc_reg_set(9)arc_reg_get(9)arc_reg_or(9)arc_reg_clr(9)
Go read those too bestie, we don't gatekeep ๐
and that's the whole page!! source/version vibes are the ./drivers/net/ethernet/arc directory, dated October 2026, and the header up top said struct arc_emac_priv(9) โ slay, you're caught up ๐
โจ
๐ฆ 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