STRUCT MDIO_IF_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Okay bestie, welcome to the Kernel API Manual 🫢 This page is all about struct mdio_if_info β€” the Ethernet controller MDIO interface. That’s the whole vibe: it’s the MDIO interface struct for an Ethernet controller, and we’re gonna go through every field like it’s a group chat screenshot. πŸ’…


πŸ’… SYNOPSIS πŸ’…

Here’s the struct in all its exact, iconic glory β€” do not come for the commas, okay? 😭

       struct mdio_if_info {
           int prtad;
           u32 mmds;
           unsigned mode_support;
           struct net_device *dev;
           int (*mdio_read)(struct net_device *dev, int prtad, int devad, u16
       addr);
           int (*mdio_write)(struct net_device *dev, int prtad, int devad, u16
       addr, u16 val);
        };

🫢 Members 🫢

  • prtad β€” PRTAD of the PHY (MDIO_PRTAD_NONE if not present/unknown). πŸ¦‹
  • mmds β€” Mask of MMDs expected to be present in the PHY. This must be non-zero unless prtad = MDIO_PRTAD_NONE. ⚠️
  • mode_support β€” MDIO modes supported. If MDIO_SUPPORTS_C22 is set then MII register access will be passed through with devad = MDIO_DEVAD_NONE. If MDIO_EMULATE_C22 is set then access to commonly used clause 22 registers will be translated into clause 45 registers. πŸ’«
  • dev β€” Net device structure. πŸ”Œ
  • mdio_read β€” Register read function; returns value or negative error code. πŸ“–
  • mdio_write β€” Register write function; returns 0 or negative error code. ✍️

πŸ”— SEE ALSO πŸ”—

Kernel file ./include/linux/mdio.h is the spot, and these are the besties you should also go say hi to:


xoxo, your Kernel API Manual bestie πŸ’– β€” source ./include/linux, dated October 2026, page struct mdio_if_info(9). Mwah πŸ’‹

πŸ“¦ where this page comes from