ksz8_r_phy_bmcr(9)
π 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 π₯
0on success π- an error code on failure π
π SEE ALSO π
go read the kernel file ./drivers/net/dsa/microchip/ksz8.c (iykyk) and also these besties:
ksz8_ind_write8(9)ksz8_ind_read8(9)ksz879x_get_loopback(9)ksz879x_set_loopback(9)ksz8_r_phy_ctrl(9)ksz8_w_phy_ctrl(9)ksz8_w_phy_bmcr(9)ksz88x3_tc_ets_add(9)ksz88x3_tc_ets_del(9)ksz8_phy_port_link_up(9)ksz8_cpu_port_link_up(9)ksz88x3_drive_strength_write(9)ksz8_parse_drive_strength(9)
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
- 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