sfp_bus_add_upstream(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to sfp_bus_add_upstream(9) from the Kernel API Manual β€” this one is literally parse and register the neighbouring device. no cap. πŸ’…


✨ SYNOPSIS ✨

int sfp_bus_add_upstream (struct sfp_bus *bus , void *upstream , const
       struct sfp_upstream_ops *ops );

πŸŽ€ ARGUMENTS πŸŽ€

  • bus β€” the struct sfp_bus found via sfp_bus_find_fwnode. that's your main-character bus. 🚌
  • upstream β€” the upstream private data. yes, the private-data vibes.
  • ops β€” the upstream's struct sfp_upstream_ops. the operations bestie.

πŸ¦‹ DESCRIPTION πŸ¦‹

Add upstream driver for the SFP bus, and if the bus is complete, register the SFP bus using sfp_register_upstream. This takes a reference on the bus, so it is safe to put the bus after this call. 🫢

lowkey important: because this takes a reference on the bus, putting the bus after this call is safe. keep that in your notes, bestie. ✨ slay ✨

The failure-side details are down in RETURN, and they are giving specifics. πŸ‘‘


🌸 RETURN 🌸

  • on success, a pointer to the sfp_bus structure, πŸŽ‰
  • NULL if no SFP is specified,
  • on failure, an error pointer value:
    • corresponding to the errors detailed for fwnode_property_get_reference_args.
    • -ENOMEM if we failed to allocate the bus.
    • an error from the upstream's connect_phy method.

🌈 SEE ALSO 🌈

Kernel file ./drivers/net/phy/sfp-bus.c, plus these icons:


kiss kiss, this page came from the source path ./drivers/net/phy, dated October 2026, and it's the sfp_bus_add_upstream(9) manual page. bye bestie! πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from