Linux Kernel
3.7.1
|
#include <linux/dma-mapping.h>
#include <linux/errno.h>
#include <linux/firewire.h>
#include <linux/firewire-constants.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>
#include <linux/export.h>
#include <asm/byteorder.h>
#include "core.h"
Go to the source code of this file.
EXPORT_SYMBOL | ( | fw_iso_buffer_init | ) |
EXPORT_SYMBOL | ( | fw_iso_buffer_destroy | ) |
EXPORT_SYMBOL | ( | fw_iso_context_create | ) |
EXPORT_SYMBOL | ( | fw_iso_context_destroy | ) |
EXPORT_SYMBOL | ( | fw_iso_context_start | ) |
EXPORT_SYMBOL | ( | fw_iso_context_queue | ) |
EXPORT_SYMBOL | ( | fw_iso_context_queue_flush | ) |
EXPORT_SYMBOL | ( | fw_iso_context_flush_completions | ) |
EXPORT_SYMBOL | ( | fw_iso_context_stop | ) |
EXPORT_SYMBOL | ( | fw_iso_resource_manage | ) |
int fw_iso_buffer_alloc | ( | struct fw_iso_buffer * | buffer, |
int | page_count | ||
) |
Definition at line 42 of file core-iso.c.
void fw_iso_buffer_destroy | ( | struct fw_iso_buffer * | buffer, |
struct fw_card * | card | ||
) |
Definition at line 125 of file core-iso.c.
int fw_iso_buffer_init | ( | struct fw_iso_buffer * | buffer, |
struct fw_card * | card, | ||
int | page_count, | ||
enum dma_data_direction | direction | ||
) |
Definition at line 90 of file core-iso.c.
size_t fw_iso_buffer_lookup | ( | struct fw_iso_buffer * | buffer, |
dma_addr_t | completed | ||
) |
Definition at line 147 of file core-iso.c.
int fw_iso_buffer_map_dma | ( | struct fw_iso_buffer * | buffer, |
struct fw_card * | card, | ||
enum dma_data_direction | direction | ||
) |
Definition at line 67 of file core-iso.c.
int fw_iso_buffer_map_vma | ( | struct fw_iso_buffer * | buffer, |
struct vm_area_struct * | vma | ||
) |
Definition at line 107 of file core-iso.c.
|
read |
Definition at line 163 of file core-iso.c.
void fw_iso_context_destroy | ( | struct fw_iso_context * | ctx | ) |
Definition at line 186 of file core-iso.c.
int fw_iso_context_flush_completions | ( | struct fw_iso_context * | ctx | ) |
Definition at line 219 of file core-iso.c.
int fw_iso_context_queue | ( | struct fw_iso_context * | ctx, |
struct fw_iso_packet * | packet, | ||
struct fw_iso_buffer * | buffer, | ||
unsigned long | payload | ||
) |
Definition at line 204 of file core-iso.c.
void fw_iso_context_queue_flush | ( | struct fw_iso_context * | ctx | ) |
Definition at line 213 of file core-iso.c.
int fw_iso_context_set_channels | ( | struct fw_iso_context * | ctx, |
u64 * | channels | ||
) |
Definition at line 199 of file core-iso.c.
Definition at line 192 of file core-iso.c.
int fw_iso_context_stop | ( | struct fw_iso_context * | ctx | ) |
Definition at line 225 of file core-iso.c.
void fw_iso_resource_manage | ( | struct fw_card * | card, |
int | generation, | ||
u64 | channels_mask, | ||
int * | channel, | ||
int * | bandwidth, | ||
bool | allocate | ||
) |
fw_iso_resource_manage() - Allocate or deallocate a channel and/or bandwidth
In parameters: card, generation, channels_mask, bandwidth, allocate Out parameters: channel, bandwidth This function blocks (sleeps) during communication with the IRM.
Allocates or deallocates at most one channel out of channels_mask. channels_mask is a bitfield with MSB for channel 63 and LSB for channel 0. (Note, the IRM's CHANNELS_AVAILABLE is a big-endian bitfield with MSB for channel 0 and LSB for channel 63.) Allocates or deallocates as many bandwidth allocation units as specified.
Returns channel < 0 if no channel was allocated or deallocated. Returns bandwidth = 0 if no bandwidth was allocated or deallocated.
If generation is stale, deallocations succeed but allocations fail with channel = -EAGAIN.
If channel allocation fails, no bandwidth will be allocated either. If bandwidth allocation fails, no channel will be allocated either. But deallocations of channel and bandwidth are tried independently of each other's success.
Definition at line 362 of file core-iso.c.