STRUCT RIO_MPORT(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐ŸŽ€ struct rio_mport(9) ๐ŸŽ€

Hey bestie!! Okay so welcome to the Kernel API Manual โ€” yes, that manual โ€” and today's main character is struct rio_mport, which is literally the RIO master port info struct. She's a big one, she's got range, and we're gonna go through every single field together because I refuse to let you skip any of them ๐Ÿ’…


โœจ NAME โœจ

struct rio_mport โ€” RIO master port info. That's it, that's the vibe. It's the master port's whole little info package ๐ŸŒธ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

Bestie, here's the shape of her. Every single line, exactly as it lives in the header. No editorials in here, just vibes:

struct rio_mport {
    struct list_head dbells;
    struct list_head pwrites;
    struct list_head node;
    struct list_head nnode;
    struct rio_net *net;
    struct mutex lock;
    struct resource iores;
    struct resource riores[RIO_MAX_MPORT_RESOURCES];
    struct rio_msg inb_msg[RIO_MAX_MBOX];
    struct rio_msg outb_msg[RIO_MAX_MBOX];
    int host_deviceid;
    struct rio_ops *ops;
    unsigned char id;
    unsigned char index;
    unsigned int sys_size;
    u32 phys_efptr;
    u32 phys_rmap;
    unsigned char name[RIO_MAX_MPORT_NAME];
    struct device dev;
    void *priv;
  #ifdef CONFIG_RAPIDIO_DMA_ENGINE;
    struct dma_device       dma;
  #endif;
    struct rio_scan *nscan;
    atomic_t state;
    unsigned int pwe_refcnt;
 };
๐Ÿ’€ Quick head's up: that dma field only shows up when CONFIG_RAPIDIO_DMA_ENGINE; is defined. So if you're not seeing her, that's why, no cap.

๐Ÿ’– Members ๐Ÿ’–

Okay now the fun part โ€” the full member-by-member breakdown. Grab a snack ๐Ÿ“

  • dbells โ€” List of doorbell events ๐Ÿ›Ž๏ธ
  • pwrites โ€” List of portwrite events โœ๏ธ
  • node โ€” Her node in the global list of master ports ๐ŸŒ
  • nnode โ€” Her node in the network list of master ports ๐ŸŒ
  • net โ€” The RIO net this mport is attached to ๐Ÿซถ
  • lock โ€” The lock that synchronizes list manipulations ๐Ÿ”’ (respect the lock, fr fr)
  • iores โ€” I/O mem resource that this master port interface owns ๐Ÿ“ฆ
  • riores โ€” The RIO resources that this master port interface owns ๐Ÿงบ
  • inb_msg โ€” RIO inbound message event descriptors ๐Ÿ“ฅ
  • outb_msg โ€” RIO outbound message event descriptors ๐Ÿ“ค
  • host_deviceid โ€” Host device ID associated with this master port ๐Ÿชช
  • ops โ€” configuration space functions โš™๏ธ
  • id โ€” Port ID, unique among all ports ๐Ÿ‘‘
  • index โ€” Port index, unique among all port interfaces of the same type ๐Ÿ”ข
  • sys_size โ€” RapidIO common transport system size ๐Ÿ“
  • phys_efptr โ€” RIO port extended features pointer ๐Ÿงญ
  • phys_rmap โ€” LP-Serial EFB Register Mapping type (1 or 2). ๐Ÿ—บ๏ธ
  • name โ€” Port name string ๐Ÿท๏ธ
  • dev โ€” device structure associated with an mport ๐Ÿ’ป
  • priv โ€” Master port private data ๐Ÿ™ˆ
  • dma โ€” DMA device associated with mport ๐ŸŒ€
  • nscan โ€” RapidIO network enumeration/discovery operations ๐Ÿ”
  • state โ€” mport device state ๐Ÿšฆ
  • pwe_refcnt โ€” port-write enable ref counter, there to track enable/disable requests ๐Ÿงฎ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

Sister structs and friends, all living in the kernel file ./include/linux/rio.h:

  • struct rio_switch(9)
  • struct rio_switch_ops(9)
  • struct rio_dev(9)
  • struct rio_msg(9)
  • struct rio_dbell(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)

And that's the whole page, bestie!! โœจ Signing off from ./include/linux, dated October 2026 โ€” stay slay, stay documented, and remember: every field matters ๐Ÿ’œ๐Ÿฆ‹๐ŸŽ€

๐Ÿ“ฆ where this page comes from