xpcs_create_mdiodev(9)
π 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
-ENODEVif 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 π
- Kernel file
./drivers/net/pcs/pcs-xpcs.cβ go read the source, iykyk π₯ xpcs_config_eee_mult_fact(9)β her cousinxpcs_create_fwnode(9)β her other cousin π
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
- 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