yt8521_modif...p_fiber_bmcr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… yt8521_modify_utp_fiber_bmcr

okay bestie, so this is a page straight out of the Kernel API Manual β€” yes, that manual β€” and it's about poking at a PHY's BMCR register. stay with me, it's actually cute πŸŽ€


✨ NAME ✨

yt8521_modify_utp_fiber_bmcr β€” bits-modify a PHY's BMCR register πŸ¦‹


🌸 SYNOPSIS 🌸

int yt8521_modify_utp_fiber_bmcr (struct phy_device *phydev , u16 mask ,
u16 set );

πŸ’– ARGUMENTS πŸ’–

  • phydev β€” the phy_device struct. the main character, honestly πŸ‘‘
  • mask β€” bit mask of bits to clear. the "not me deleting these bits" energy πŸ™ˆ
  • set β€” bit mask of bits to set. the "slay, we're turning these ON" energy ✨

⭐ NOTE ⭐

so this is a convenience function that lets you modify a PHY's BMCR register like this, and I need you to memorize the formula fr fr:

new register value = (old register value & ~mask) | set πŸ’…

here's the tea on YT8521: it has two space (utp/fiber) and three mode (utp/fiber/poll), and each space has MII_BMCR. poll mode combines utp and faber, so you need to do both. no cap, both of them 😭

it returns 0 or a negative errno code β€” so check that return value, bestie, don't just vibe past it 🌈

lowkey important: the return being a negative errno code means a bad time is possible. treat a non-zero return as your sign from the universe πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/net/phy/motorcomm.c β€” and honestly the whole friend group shows up here:


and that's the whole page, bestie 🫢 this one lives in ./drivers/net/phy, dated October 2026, and the header/footer vibe check was yt8521_modif...p_fiber_bmcr(9) on both ends. go forth and modify those bits πŸ’œπŸ“

πŸ“¦ where this page comes from