ksz8_phy_port_link_up(9)
π ksz8_phy_port_link_up(9) β the Kernel API Manual, but make it make sense
okay bestie, welcome to the group chat for this one. we're in the Kernel API Manual section, and today's main character is ksz8_phy_port_link_up β she configures ports with integrated PHYs and honestly? she ate. β¨
β¨ NAME β¨
ksz8_phy_port_link_up β configures ports with integrated PHYs π«Ά
πΈ SYNOPSIS πΈ
void ksz8_phy_port_link_up (struct ksz_device *dev , int port , int
duplex , bool tx_pause , bool rx_pause );
like, that's the whole signature. void function, four args plus the device. she does stuff and returns nothing, periodt. π
π ARGUMENTS π
devβ the KSZ device instance. your whole lil switch baby. π₯portβ the port number you wanna configure. yes, that port.duplexβ the desired duplex mode. half or full, you decide, queen.tx_pauseβ iftrue, turns transmit pause on. that's the sending-side pause. β¨rx_pauseβ iftrue, turns receive pause on. that's the receiving-side pause. β¨
π¦ DESCRIPTION π¦
so basically, this function configures flow control settings for a given port, based on the desired settings and the current duplex mode. it's giving "settings matchmaker." π
According to the KSZ8873 datasheet, the PORT_FORCE_FLOW_CTRL bit in the Port Control 2 register β that's 0x1A for Port 1, 0x22 for Port 2, and 0x32 for Port 3, no cap β determines how flow control is handled on the port. the datasheet literally says:
"1 = will always enable full-duplex flow control on the port, regardless of AN result. 0 = full-duplex flow control is enabled based on AN result."
so yeah, this means the flow control behavior depends on the state of this bit, and it's kinda a whole vibe check:
- if
PORT_FORCE_FLOW_CTRLis set to1, the switch will ignore AN results and force flow control on the port. she said "I'm not listening, I'm forcing it." π - if
PORT_FORCE_FLOW_CTRLis set to0, the switch will enable or disable flow control based on the AN results. she's flexible like that. π
π the limitation (read this part bestie)
However β and this is the part where we all go "hmm" β there's a potential limitation in this configuration. It is currently not possible to force disable flow control on a port if we still advertise pause support.
While such a configuration is not currently supported by Linux, and may not make practical sense, it's important to be aware of this limitation when working with the KSZ8873 and similar devices. π«Ά
so like, lowkey not a problem right now, but highkey know it exists. iykyk. π
β SEE ALSO β
Kernel file ./drivers/net/dsa/microchip/ksz8.c and her whole friend group:
ksz8_ind_write8(9)ksz8_ind_read8(9)ksz879x_get_loopback(9)ksz879x_set_loopback(9)ksz8_r_phy_ctrl(9)ksz8_r_phy_bmcr(9)ksz8_w_phy_ctrl(9)ksz8_w_phy_bmcr(9)ksz88x3_tc_ets_add(9)ksz88x3_tc_ets_del(9)ksz8_cpu_port_link_up(9)ksz88x3_drive_strength_write(9)ksz8_parse_drive_strength(9)
and that's the page!! π this icon of a manpage lives in ./drivers/net/dsa/microchip, dated October 2026, and it's called ksz8_phy_port_link_up(9). slay, go configure some ports, ily, bye πβ¨π¦
π¦ 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