ksz_parent_mdio_write(9)
π ksz_parent_mdio_write(9) β like, the Kernel API Manual bestie β¨
okay so bestie, welcome to the Kernel API Manual page for ksz_parent_mdio_write β yes that whole name, we're saying it with our chest π«Ά
πΈ NAME πΈ
ksz_parent_mdio_write β literally just writes data to a PHY register on the parent MDIO bus. that's the whole vibe, no cap π
β¨ SYNOPSIS β¨
int ksz_parent_mdio_write (struct mii_bus *bus , int addr , int regnum ,
u16 val );
π ARGUMENTS π
busβ the MDIO bus structure. the actual bus, the main character πaddrβ PHY address on the parent MDIO bus. where we're headed, iykykregnumβ the register number you're writing to. pick your fave π₯valβ the value going into that PHY register. the payload, the moment π
π¦ DESCRIPTION π¦
so this function is giving direct write operation on the parent MDIO bus for accessing PHY registers. and the way it does it? it bypasses SPI or I2C entirely β not me skipping the whole middleman π β and uses the parent MDIO bus to modify the PHY register values at the specified address. lowkey iconic, highkey efficient β¨
β RETURN β
0 on success, or a negative error code on failure. slay when it works, and when it doesn't... well, negative error code. we move π₯²
π SEE ALSO π
bestie go look at the Kernel file ./drivers/net/dsa/microchip/ksz_common.c β that's the source, the origin story π«Ά
and then the whole friend group of related functions, in order, because we do not skip anyone:
ksz_phylink_mac_disable_tx_lpi(9)ksz_phylink_mac_enable_tx_lpi(9)ksz_update_port_member(9)ksz_parent_mdio_read(9)ksz_phy_addr_to_port(9)ksz_irq_phy_setup(9)ksz_irq_phy_free(9)ksz_parse_dt_phy_config(9)ksz_mdio_register(9)ksz_handle_wake_reason(9)ksz_is_port_mac_global_usable(9)ksz_get_wol(9)ksz_set_wol(9)ksz_wol_pre_shutdown(9)ksz_switch_macaddr_get(9)ksz_switch_shutdown(9)ksz_drive_strength_to_reg(9)ksz_drive_strength_error(9)ksz_drive_strength_write(9)
ngl, that's a long SEE ALSO and every single one of them ate ππ
and that's the page, bestie!! π sourced from ./drivers/net/dsa/microchip, stamped October 2026 β so go forth, write that PHY register at that address, and remember: SPI and I2C did not get an invite π¦β¨π periodt.
π¦ 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