Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
cmp.h File Reference
#include <linux/mutex.h>
#include <linux/types.h>
#include "iso-resources.h"

Go to the source code of this file.

Data Structures

struct  cmp_connection
 

Functions

int cmp_connection_init (struct cmp_connection *connection, struct fw_unit *unit, unsigned int ipcr_index)
 
void cmp_connection_destroy (struct cmp_connection *connection)
 
int cmp_connection_establish (struct cmp_connection *connection, unsigned int max_payload)
 
int cmp_connection_update (struct cmp_connection *connection)
 
void cmp_connection_break (struct cmp_connection *connection)
 

Function Documentation

void cmp_connection_break ( struct cmp_connection c)

cmp_connection_break - break the connection to the target : the connection manager

This function deactives the connection in the target's input plug control register, and frees the isochronous resources of the connection. Before calling this function, the caller should cease transmitting packets.

Definition at line 286 of file cmp.c.

void cmp_connection_destroy ( struct cmp_connection c)

cmp_connection_destroy - free connection manager resources : the connection manager

Definition at line 139 of file cmp.c.

int cmp_connection_establish ( struct cmp_connection c,
unsigned int  max_payload_bytes 
)

cmp_connection_establish - establish a connection to the target : the connection manager : the amount of data (including CIP headers) per packet

This function establishes a point-to-point connection from the local computer to the target by allocating isochronous resources (channel and bandwidth) and setting the target's input plug control register. When this function succeeds, the caller is responsible for starting transmitting packets.

Definition at line 185 of file cmp.c.

int cmp_connection_init ( struct cmp_connection c,
struct fw_unit unit,
unsigned int  ipcr_index 
)

cmp_connection_init - initializes a connection manager : the connection manager to initialize : a unit of the target device : the index of the iPCR on the target device

Definition at line 101 of file cmp.c.

int cmp_connection_update ( struct cmp_connection c)

cmp_connection_update - update the connection after a bus reset : the connection manager

This function must be called from the driver's .update handler to reestablish any connection that might have been active.

Returns zero on success, or a negative error code. On an error, the connection is broken and the caller must stop transmitting iso packets.

Definition at line 238 of file cmp.c.