mac_finish(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mac_finish(9) β€” the "okay we're SO back" callback

So this is mac_finish, straight out of the Kernel API Manual bestie. It's the little cleanup era after mac_prepare β€” the second half of the glow-up. ✨


🌸 NAME 🌸

mac_finish β€” finish a to change the PHY interface mode

(no that grammar is not a typo of mine, that's literally what it says, and honestly? it ate. we respect the source. 🫢)


πŸŽ€ SYNOPSIS πŸŽ€

int mac_finish (struct phylink_config *config , unsigned int mode ,
                phy_interface_t iface );

πŸ’– ARGUMENTS πŸ’–

  • config β€” a pointer to a struct phylink_config. yes, a pointer. it's giving "here's where the struct lives, go look". πŸ‘€
  • mode β€” one of MLO_AN_FIXED, MLO_AN_PHY, MLO_AN_INBAND. pick your fighter, those are the only three, no cap.
  • iface β€” interface mode to switch to. the whole point of the operation tbh. πŸ’«

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: phylink will call this if it called mac_prepare β€” like, these two are a matched set, a duo, a package deal. it's your chance as the MAC to complete any necessary steps after the MAC and PCS have been configured for the mode and iface.

the example the page gives (and it's a good one, lowkey iconic): a MAC driver may wish to re-enable the Serdes PHY here if it was previously disabled by mac_prepare. so like, prepare turned it off, finish turns it back on. character development fr fr. πŸ’€

⚠️ Returns zero on success, or negative errno on failure which will be reported to the kernel log. so if it fails, everybody's gonna know. no hiding it. the kernel log is the group chat and it will screenshot. πŸ“Έ

🌈 SEE ALSO 🌈

Kernel file ./include/linux/phylink.h struct phylink_link_state(9) β€” and the whole friend group:


mwah πŸ’‹ that's the page. source lives in ./include/linux, and this masterpiece is dated October 2026 β€” yes, from the future, because she's ahead of her time. periodt. πŸ‘‘

πŸ“¦ where this page comes from