STRUCT RIO_DEV(9)
π struct rio_dev(9) π
okay so bestie, welcome to the struct rio_dev glow-up page, straight outta the Kernel API Manual. this is the iconic little struct that holds all the RIO device info, and we're gonna walk through every single field together because you deserve to know π€β¨
π NAME π
struct rio_dev β RIO device info. that's it, that's the vibe. it's the blueprint, the main character, the whole personality π
β¨ SYNOPSIS β¨
here's the whole gorgeous thing, no cap, copied exactly:
struct rio_dev {
struct list_head global_list;
struct list_head net_list;
struct rio_net *net;
bool do_enum;
u16 did;
u16 vid;
u32 device_rev;
u16 asm_did;
u16 asm_vid;
u16 asm_rev;
u16 efptr;
u32 pef;
u32 swpinfo;
u32 src_ops;
u32 dst_ops;
u32 comp_tag;
u32 phys_efptr;
u32 phys_rmap;
u32 em_efptr;
u64 dma_mask;
struct rio_driver *driver;
struct device dev;
struct resource riores[RIO_MAX_DEV_RESOURCES];
int (*pwcback) (struct rio_dev *rdev, union rio_pw_msg *msg, int
step);
u16 destid;
u8 hopcount;
struct rio_dev *prev;
atomic_t state;
struct rio_switch rswitch[];
};
the way that function pointer wraps onto its own line? she's doing her best, we love her π«Ά
πΈ Members πΈ
okay bestie, grab a snack, we're going through all of them π
global_listβ the node in the list of all RIO devices. every device's in this group chat π¬net_listβ node in the list of RIO devices in a network. smaller, cozier group chat π¦netβ the network this device is a part of. found family π₯Ήdo_enumβ the enumeration flag. yes/no bestie, are we enumerating β¨didβ Device ID π₯vidβ Vendor ID πdevice_revβ Device revision, glow-up history πasm_didβ Assembly device ID π§asm_vidβ Assembly vendor ID πasm_revβ Assembly revision βefptrβ Extended feature pointer πpefβ Processing element features πswpinfoβ Switch port info πsrc_opsβ Source operation capabilities πdst_opsβ Destination operation capabilities πcomp_tagβ RIO component tag π·οΈphys_efptrβ RIO device extended features pointer πphys_rmapβ LP-Serial Register Map Type (literally1or2, those are the options, no others, periodt) π«Άem_efptrβ RIO Error Management features pointer πdma_maskβ Mask of bits of RIO address this device implements. important, do not skip πdriverβ the driver that's claiming this device. it's taken bestie πdevβ the device model device πrioresβ the RIO resources this device owns. hers. don't touch πΈpwcbackβ the port-write callback function for this device. it's typed asint (*pwcback) (struct rio_dev *rdev, union rio_pw_msg *msg, int step)for the record β¨destidβ Network destination ID (or, for a switch, the associated destid) πhopcountβ the hopcount to this device. how many hops, exactly, that's the whole job π¦prevβ the previous RIO device connected to the current one. linked list lore πstateβ device state, keeping track of where we're at π«Άrswitchβ astruct rio_switch, if it's valid for this device π
ok quick heads up bestie:rswitchis a flexible array member (see those[]brackets?), so it's only there when it's valid for the device. do not go poking past it, that's giving undefined behaviour energy π
π¦ SEE ALSO π¦
kernel file ./include/linux/rio.h has the whole family album, plus these icons:
struct rio_switch(9), struct rio_switch_ops(9), struct rio_msg(9), struct rio_dbell(9), struct rio_mport(9), struct rio_net(9), struct rio_mport_attr(9), struct rio_ops(9), struct rio_driver(9), struct rio_scan(9), struct rio_scan_node(9)
go read them all, i'll wait π§β¨
and that's the whole page bestie!! it lives over in ./include/linux and it was dated October 2026 β so like, keep that in mind if anything looks different later, mwah πππ
π¦ 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