Documentation/driver-api/rapidio/rio_cm.rst

Source file repositories/reference/linux-study-clean/Documentation/driver-api/rapidio/rio_cm.rst

File Facts

System
Linux kernel
Corpus path
Documentation/driver-api/rapidio/rio_cm.rst
Extension
.rst
Size
5963 bytes
Lines
136
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

==========================================================================
RapidIO subsystem Channelized Messaging character device driver (rio_cm.c)
==========================================================================


1. Overview
===========

This device driver is the result of collaboration within the RapidIO.org
Software Task Group (STG) between Texas Instruments, Prodrive Technologies,
Nokia Networks, BAE and IDT.  Additional input was received from other members
of RapidIO.org.

The objective was to create a character mode driver interface which exposes
messaging capabilities of RapidIO endpoint devices (mports) directly
to applications, in a manner that allows the numerous and varied RapidIO
implementations to interoperate.

This driver (RIO_CM) provides to user-space applications shared access to
RapidIO mailbox messaging resources.

RapidIO specification (Part 2) defines that endpoint devices may have up to four
messaging mailboxes in case of multi-packet message (up to 4KB) and
up to 64 mailboxes if single-packet messages (up to 256 B) are used. In addition
to protocol definition limitations, a particular hardware implementation can
have reduced number of messaging mailboxes.  RapidIO aware applications must
therefore share the messaging resources of a RapidIO endpoint.

Main purpose of this device driver is to provide RapidIO mailbox messaging
capability to large number of user-space processes by introducing socket-like
operations using a single messaging mailbox.  This allows applications to
use the limited RapidIO messaging hardware resources efficiently.

Most of device driver's operations are supported through 'ioctl' system calls.

When loaded this device driver creates a single file system node named rio_cm
in /dev directory common for all registered RapidIO mport devices.

Following ioctl commands are available to user-space applications:

- RIO_CM_MPORT_GET_LIST:
    Returns to caller list of local mport devices that
    support messaging operations (number of entries up to RIO_MAX_MPORTS).
    Each list entry is combination of mport's index in the system and RapidIO
    destination ID assigned to the port.
- RIO_CM_EP_GET_LIST_SIZE:
    Returns number of messaging capable remote endpoints
    in a RapidIO network associated with the specified mport device.
- RIO_CM_EP_GET_LIST:
    Returns list of RapidIO destination IDs for messaging
    capable remote endpoints (peers) available in a RapidIO network associated
    with the specified mport device.
- RIO_CM_CHAN_CREATE:
    Creates RapidIO message exchange channel data structure
    with channel ID assigned automatically or as requested by a caller.
- RIO_CM_CHAN_BIND:
    Binds the specified channel data structure to the specified
    mport device.
- RIO_CM_CHAN_LISTEN:
    Enables listening for connection requests on the specified
    channel.
- RIO_CM_CHAN_ACCEPT:
    Accepts a connection request from peer on the specified
    channel. If wait timeout for this request is specified by a caller it is
    a blocking call. If timeout set to 0 this is non-blocking call - ioctl
    handler checks for a pending connection request and if one is not available
    exits with -EGAIN error status immediately.
- RIO_CM_CHAN_CONNECT:
    Sends a connection request to a remote peer/channel.
- RIO_CM_CHAN_SEND:

Annotation

Implementation Notes