STRUCT ARC_EMAC_PRIV(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… 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 ๐ŸŒธ

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