yt8521_modify_bmcr_paged(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… yt8521_modify_bmcr_paged(9) โ€” kernel api manual energy โœจ

okay so bestie, welcome to the yt8521_modify_bmcr_paged page โ€” this is the Kernel API Manual entry for it, and honestly? it's giving "tiny helper function with main character energy". ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

yt8521_modify_bmcr_paged โ€” bits-modify a PHY's BMCR register on one page. that's it, that's the whole vibe. โœจ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

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

like, literally the whole signature, no cap. ๐Ÿซถ


๐Ÿ’– ARGUMENTS ๐Ÿ’–

  • phydev โ€” the phy_device struct. the main character of the operation, obvi. ๐Ÿ‘‘
  • page โ€” the reg page you wanna operate on, and it's got exactly two moods: YT8521_RSSR_FIBER_SPACE or YT8521_RSSR_UTP_SPACE. pick your fighter. ๐Ÿงš
  • mask โ€” the bit mask of bits to clear. bye-bye bits. ๐Ÿ’€
  • set โ€” the bit mask of bits to set. hello bits. ๐Ÿ”ฅ

โญ NOTE โญ

so this is a convenience function, and what it does is let you modify a PHY's BMCR register like this, fr fr:

new register value = (old register value & ~mask) | set

iconic bit math, honestly. ๐Ÿงฎโœจ

now the lore: YT8521 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 gotta do both. ๐Ÿ™ˆ and if it's a reset, it will wait for completion โ€” like, it literally sits there until it's done, periodt. โณ

returns 0 or a negative errno code. so either slay or sad. ๐Ÿ˜ญ


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

the whole friend group, in order, no one left behind (iykyk). kernel file ./drivers/net/phy/motorcomm.c, plus:


and that's the page, bestie!! ๐Ÿ’œ this lil manual lives over in ./drivers/net/phy and it's dated October 2026 โ€” so yeah, future vibes only. ๐Ÿฆ‹โœจ go forth and modify those BMCR bits, you absolute icon. ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from