mdiobus_c45_read(9)
πΈ mdiobus_c45_read β NAME πΈ
Sooo bestie, this is mdiobus_c45_read β the convenience function for reading a given MII mgmt register. That's it, that's the whole vibe: it reads a register for you so you don't have to do the grubby low-level dance yourself π
(btw you're in the Kernel API Manual, section 9 β welcome, make yourself comfy π )
β¨ SYNOPSIS β¨
int mdiobus_c45_read (struct mii_bus *bus , int addr , int devad , u32
regnum );
π«Ά ARGUMENTS π«Ά
busβ themii_busstruct. The whole bus situation, the main character of this call.addrβ the phy address. Which phy we're talking to, no cap.devadβ device address to read.regnumβ register number to read.
π RETURN π
The register value if it all goes well β yay β¨ β and a negative error code on failure π (so like, check it, fr fr).
π NOTE π
MUST NOT be called from interrupt context. Not a suggestion, a MUST NOT, okay?? The reason is because the bus read/write functions may wait for an interrupt to conclude the operation β so if you're already in an interrupt, you'd be waiting on yourself and that's giving deadlock energy ππ
π¦ SEE ALSO π¦
Kernel file ./drivers/net/phy/mdio_bus.c plus this whole little family of friends:
__mdiobus_read(9)__mdiobus_write(9)__mdiobus_modify_changed(9)__mdiobus_c45_read(9)__mdiobus_c45_write(9)__mdiobus_c45_modify_changed(9)mdiobus_read_nested(9)mdiobus_read(9)mdiobus_c45_read_nested(9)mdiobus_write_nested(9)mdiobus_write(9)mdiobus_c45_write(9)mdiobus_c45_write_nested(9)mdiobus_modify(9)mdiobus_c45_modify(9)mdiobus_modify_changed(9)mdiobus_c45_modify_changed(9)
okay that's the whole page, you ate it π β¨
β source ./drivers/net/phy, October 2026, straight outta the Kernel API Manual. mwah, go read some registers responsibly πππ
π¦ 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