mdiobus_scan_c45(9)
π 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β themii_busyou 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:
mdiobus_release(9)mdio_bus_match(9)mdiobus_alloc_size(9)mdiobus_scan_c22(9)__mdiobus_register(9)mdiobus_free(9)mdio_find_bus(9)of_mdio_find_bus(9)
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
- 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