xpcs_create_mdiodev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xpcs_create_mdiodev β€” from the Kernel API Manual, bestie

okay so real talk, this is a page from the Kernel API Manual about xpcs_create_mdiodev, and honestly? she's a little baddie. the whole job is making a DW xPCS instance and slapping it onto the MDIO bus at addr. that's it, that's the vibe. ✨


πŸŽ€ NAME πŸŽ€

xpcs_create_mdiodev β€” literally just creating a DW xPCS instance with the MDIO addr, no cap 🫢


🌸 SYNOPSIS 🌸

struct dw_xpcs * xpcs_create_mdiodev (struct mii_bus *bus , int addr );

like, that's the whole signature. she's compact, she's clean, she ate πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • bus β€” a pointer to the MDIO-bus descriptor for the device you want looked at πŸ‘€
  • addr β€” the device's MDIO-bus ID, i.e. which spot on the bus we're talking to 🎯

πŸ’– RETURN πŸ’–

so on a good day you get back a pointer to the DW XPCS handle and everyone cheers πŸŽ‰

but if it goes sideways:

  • you get -ENODEV if the PCS device genuinely couldn't be found on the bus 😭
  • or you get other negative errno values, and those ones are related to the data allocation and the MDIO-bus communications. so like, allocation drama or bus-chatter drama. either way, negative errno = not slaying πŸ™ˆ
ngl bestie, always check the return before you start celebrating. a pointer-shaped thing that's actually an errno is giving betrayal πŸ’€

🌈 SEE ALSO 🌈


that's the whole page, periodt. source/version situation is ./drivers/net/pcs, dated October 2026, and it lives in the Kernel API Manual alongside her friends. mwah, go forth and create your xPCS instances πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from