mdiobus_scan_c45(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mdiobus_scan_c45 β€” like, the C45 scan era ✨

okay so bestie, we're in the Kernel API Manual (mdiobus_scan_c45(9), section 9, in case you were wondering) and this one is genuinely such a mood. let me tell you everything πŸŽ€


🌸 NAME 🌸

mdiobus_scan_c45 β€” scan one address on a bus for C45 MDIO devices. that's it. that's the whole job. one address. slay πŸ’…


✨ SYNOPSIS ✨

struct phy_device * mdiobus_scan_c45 (struct mii_bus *bus , int addr );

look at her go 😭 returns a struct phy_device *, takes a struct mii_bus *bus and an int addr. iconic signature, no notes.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • bus β€” the mii_bus you wanna scan, bestie. that's the one.
  • addr β€” the address on that bus you're scanning. just the one address, we're not doing a whole sweep here πŸ’€

πŸ”₯ DESCRIPTION πŸ”₯

okay so picture this: this function scans one address on the MDIO bus, looking for devices that can be identified using a vendor/product ID in registers 2 and 3. iykyk, those are the registers.

now, real talk: not all MDIO devices have such registers, but PHY devices typically do. which is why this function literally assumes anything it finds is a PHY β€” or at the very least can be treated as a PHY. main character assumption energy, honestly πŸ™ˆ

so heads up: other MDIO devices, like switches, will probably not be found during the scan. that's just how it is, no cap. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

like, go read these too, they're all in the kernel file ./drivers/net/phy/mdio_bus_provider.c:

the c22 one is literally her sibling, go say hi 🫢


and that's the whole page, bestie! 🧚 this gorgeous little number lives over in ./drivers/net/phy, and the version you're looking at is dated October 2026 β€” future vibes fr fr β­πŸ’–πŸ“

πŸ“¦ where this page comes from