sfp_bus_find_fwnode(9)
β¨ sfp_bus_find_fwnode β¨
okay so this is the sfp_bus_find_fwnode(9) page from the Kernel API Manual, and bestie it's literally about finding your SFP bus π¦
π NAME π
sfp_bus_find_fwnode β parse and locate the SFP bus from fwnode πΈ
π SYNOPSIS π
struct sfp_bus * sfp_bus_find_fwnode (const struct fwnode_handle *fwnode
);
πΌ ARGUMENTS πΌ
fwnodeβ the firmware node for the parent device, aka the MAC or the PHY. that's the thing we're snooping through π
π₯ DESCRIPTION π₯
So what this does: it parses the parent device's firmware node looking for an SFP bus, and then it locates the sfp_bus structure β and it increments its reference count while it's at it, bestie, so don't just wander off with it π
You must put that reference back via sfp_bus_put when you're done. no cap, that's the deal π«Ά
Now, the original page lists these error bullets right here in the description section, so here they are, no edits:
- corresponding to the errors detailed for
fwnode_property_get_reference_args. -ENOMEMif we failed to allocate the bus.- an error from the upstream's
connect_phymethod.
π RETURN π
- on success, a pointer to the
sfp_busstructure, NULLif no SFP is specified,- on failure, an error pointer value:
π SEE ALSO π
Kernel file ./drivers/net/phy/sfp-bus.c, plus all these icons: struct sfp_bus(9), sfp_select_interface(9), sfp_bus_put(9), sfp_get_module_info(9), sfp_get_module_eeprom(9), sfp_get_module_eeprom_by_page(9), sfp_upstream_start(9), sfp_upstream_stop(9), sfp_upstream_set_signal_rate(9), sfp_bus_add_upstream(9), sfp_bus_del_upstream(9), sfp_get_name(9) β
π friendly reminder from your girl: that reference count is not a vibe, it's a contract. sfp_bus_put it. periodt.
and that's the whole page!! mwah π this one came from ./drivers/net/phy, dated October 2026, and it's the sfp_bus_find_fwnode(9) manual page β go read the source file if you want the behind-the-scenes, iykyk π§ββοΈ
π¦ 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