ksz8_r_phy_bmcr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ksz8_r_phy_bmcr β€” like, the Kernel API Manual page for it (section 9, bestie)

okay so welcome to the group chat, the manual page is literally called ksz8_r_phy_bmcr and it lives in the Kernel API Manual, section 9. pull up a chair πŸŽ€


✨ NAME ✨

ksz8_r_phy_bmcr β€” okay so what this icon does is it translates stuff and then reads from the SMI interface over to a MIIM PHY Basic mode control register (that's Reg. 0, mwah πŸ’‹). translation AND reading, she's multifaceted.

🌸 SYNOPSIS 🌸

int ksz8_r_phy_bmcr (struct ksz_device *dev , u16 port , u16 *val );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the KSZ device instance, like the main character in question πŸ‘‘
  • port β€” the port number you want read. yes, that one.
  • val β€” the value that got read out of the SMI interface. it lives here now.

πŸ’– DESCRIPTION πŸ’–

so basically this function reads the SMI interface and then translates the hardware register bit values into their corresponding control settings for a MIIM PHY Basic mode control register. it's giving translator era. she's fluent πŸ’…

🧚 MIIM Bit Mapping Comparison between KSZ8794 and KSZ8873 🧚

this is the part where you sit up straight, bestie β€” putting it in list form so your brain doesn't short-circuit:

  • Bit 15 - Soft Reset β€” KSZ8794: 0xF/4 Β· KSZ8873: Not supported 😭
  • Bit 14 - Loopback β€” KSZ8794: 0xD/0 (MAC), 0xF/7 (PHY) Β· KSZ8873: ~ 0xD/0 (PHY)
  • Bit 13 - Force 100 β€” KSZ8794: 0xC/6 Β· KSZ8873: = 0xC/6
  • Bit 12 - AN Enable β€” KSZ8794: 0xC/7 (reverse logic πŸ‘€) Β· KSZ8873: ~ 0xC/7
  • Bit 11 - Power Down β€” KSZ8794: 0xD/3 Β· KSZ8873: = 0xD/3
  • Bit 10 - PHY Isolate β€” KSZ8794: 0xF/5 Β· KSZ8873: Not supported
  • Bit 9 - Restart AN β€” KSZ8794: 0xD/5 Β· KSZ8873: = 0xD/5
  • Bit 8 - Force Full-Duplex β€” KSZ8794: 0xC/5 Β· KSZ8873: = 0xC/5
  • Bit 7 - Collision Test/Res. β€” KSZ8794: Not supported Β· KSZ8873: Not supported πŸ’€ (both of them, iconic flop)
  • Bit 6 - Reserved β€” KSZ8794: Not supported Β· KSZ8873: Not supported
  • Bit 5 - Hp_mdix β€” KSZ8794: 0x9/7 Β· KSZ8873: ~ 0xF/7
  • Bit 4 - Force MDI β€” KSZ8794: 0xD/1 Β· KSZ8873: = 0xD/1
  • Bit 3 - Disable MDIX β€” KSZ8794: 0xD/2 Β· KSZ8873: = 0xD/2
  • Bit 2 - Disable Far-End F. β€” KSZ8794: ???? πŸ€·β€β™€οΈ Β· KSZ8873: 0xD/4
  • Bit 1 - Disable Transmit β€” KSZ8794: 0xD/6 Β· KSZ8873: = 0xD/6
  • Bit 0 - Disable LED β€” KSZ8794: 0xD/7 Β· KSZ8873: = 0xD/7

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • an error code on failure 😭

🌈 SEE ALSO 🌈

go read the kernel file ./drivers/net/dsa/microchip/ksz8.c (iykyk) and also these besties:


fr fr read the whole list, don't skip. they're all in the same friend group and it would be rude. 🫢

okay that's the whole page, mwah πŸ’‹ this came from ./drivers/net/dsa/microchip, dated October 2026 β€” and honestly? slay. periodt. πŸ“πŸ’œ

πŸ“¦ where this page comes from