rio_setup_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual β€” today’s main character is rio_setup_device(9), and we’re gonna get you fully caught up. πŸ’–βœ¨

✨ NAME ✨

rio_setup_device β€” literally allocates and sets up a RIO device. 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

struct rio_dev * rio_setup_device (struct rio_net *net , struct
       rio_mport *port , u16 destid , u8 hopcount , int do_enum );

πŸŽ€ ARGUMENTS πŸŽ€

  • net β€” the RIO network. 🌐
  • port β€” the master port to send transactions. πŸ“€
  • destid β€” the current destination ID. 🎯
  • hopcount β€” the current hopcount. 🦘
  • do_enum β€” the enumeration/discovery mode flag. πŸ”

πŸ’… DESCRIPTION πŸ’…

okay so here’s the tea: this function allocates a RIO device and configures fields based on configuration space contents. 🧚✨

If the device has a destination ID register, a destination ID is either assigned in enumeration mode or read from configuration space in discovery mode. No cap. πŸŽ€

And if the device has switch capabilities, then a switch is allocated and configured appropriately. slay. πŸ”₯

Returns a pointer to a RIO device on success or NULL on failure. That’s the whole plot. πŸ‘‘

🌈 SEE ALSO 🌈

Also peep the Kernel file ./drivers/rapidio/rio-scan.c and the whole icon squad: rio_destid_alloc(9), rio_destid_reserve(9), rio_destid_free(9), rio_destid_first(9), rio_destid_next(9), rio_get_device_id(9), rio_set_device_id(9), rio_clear_locks(9), rio_enum_host(9), rio_device_has_destid(9), rio_release_dev(9), rio_is_switch(9), rio_sport_is_active(9), rio_get_host_deviceid_lock(9), rio_enum_peer(9), rio_enum_complete(9), rio_disc_peer(9), rio_mport_is_active(9), rio_update_route_tables(9), rio_init_em(9), rio_enum_mport(9), rio_build_route_tables(9), rio_disc_mport(9), rio_basic_attach(9).


okay that’s the whole vibe β€” brought to you from ./drivers/rapidio, dated October 2026. πŸ«ΆπŸ’…

πŸ“¦ where this page comes from