---
name: "struct_rio_ops"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/struct_rio_ops"
---

# struct\_rio\_ops(9)

Low-level RIO configuration space operations

## NAME

struct\_rio\_ops - Low-level RIO configuration space operations

## SYNOPSIS

```
struct rio_ops {
  int (* lcread) (struct rio_mport *mport, int index, u32 offset, int len,u32 *data);
  int (* lcwrite) (struct rio_mport *mport, int index, u32 offset, int len,u32 data);
  int (* cread) (struct rio_mport *mport, int index, u16 destid,u8 hopcount, u32 offset, int len, u32 *data);
  int (* cwrite) (struct rio_mport *mport, int index, u16 destid,u8 hopcount, u32 offset, int len, u32 data);
  int (* dsend) (struct rio_mport *mport, int index, u16 destid, u16 data);
  int (* pwenable) (struct rio_mport *mport, int enable);
  int (* open_outb_mbox) (struct rio_mport *mport, void *dev_id,int mbox, int entries);
  void (* close_outb_mbox) (struct rio_mport *mport, int mbox);
  int (* open_inb_mbox) (struct rio_mport *mport, void *dev_id,int mbox, int entries);
  void (* close_inb_mbox) (struct rio_mport *mport, int mbox);
  int (* add_outb_message) (struct rio_mport *mport, struct rio_dev *rdev,int mbox, void *buffer, size_t len);
  int (* add_inb_buffer) (struct rio_mport *mport, int mbox, void *buf);
  void *(* get_inb_message) (struct rio_mport *mport, int mbox);
  int (* map_inb) (struct rio_mport *mport, dma_addr_t lstart,u64 rstart, u64 size, u32 flags);
  void (* unmap_inb) (struct rio_mport *mport, dma_addr_t lstart);
  int (* query_mport) (struct rio_mport *mport,struct rio_mport_attr *attr);
  int (* map_outb) (struct rio_mport *mport, u16 destid, u64 rstart,u32 size, u32 flags, dma_addr_t *laddr);
  void (* unmap_outb) (struct rio_mport *mport, u16 destid, u64 rstart);
};
```

## MEMBERS

lcread

Callback to perform local (master port) read of config space.

lcwrite

Callback to perform local (master port) write of config space.

cread

Callback to perform network read of config space.

cwrite

Callback to perform network write of config space.

dsend

Callback to send a doorbell message.

pwenable

Callback to enable/disable port-write message handling.

open\_outb\_mbox

Callback to initialize outbound mailbox.

close\_outb\_mbox

Callback to shut down outbound mailbox.

open\_inb\_mbox

Callback to initialize inbound mailbox.

close\_inb\_mbox

Callback to shut down inbound mailbox.

add\_outb\_message

Callback to add a message to an outbound mailbox queue.

add\_inb\_buffer

Callback to add a buffer to an inbound mailbox queue.

get\_inb\_message

Callback to get a message from an inbound mailbox queue.

map\_inb

Callback to map RapidIO address region into local memory space.

unmap\_inb

Callback to unmap RapidIO address region mapped with **map\_inb**.

query\_mport

Callback to query mport device attributes.

map\_outb

Callback to map outbound address region into local memory space.

unmap\_outb

Callback to unmap outbound RapidIO address region.

## AUTHOR

**Matt Porter** \<mporter@kernel.crashing.org\>, \<mporter@mvista.com\>

Author.

## COPYRIGHT
