Linux Kernel
3.7.1
|
#include <linux/device.h>
#include <linux/firewire.h>
#include <linux/firewire-constants.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/delay.h>
#include "fcp.h"
#include "lib.h"
Go to the source code of this file.
Data Structures | |
struct | fcp_transaction |
Macros | |
#define | CTS_AVC 0x00 |
#define | ERROR_RETRIES 3 |
#define | ERROR_DELAY_MS 5 |
#define | FCP_TIMEOUT_MS 125 |
Enumerations | |
enum | fcp_state { STATE_PENDING, STATE_BUS_RESET, STATE_COMPLETE } |
Functions | |
int | fcp_avc_transaction (struct fw_unit *unit, const void *command, unsigned int command_size, void *response, unsigned int response_size, unsigned int response_match_bytes) |
EXPORT_SYMBOL (fcp_avc_transaction) | |
void | fcp_bus_reset (struct fw_unit *unit) |
EXPORT_SYMBOL (fcp_bus_reset) | |
module_init (fcp_module_init) | |
module_exit (fcp_module_exit) | |
enum fcp_state |
EXPORT_SYMBOL | ( | fcp_avc_transaction | ) |
EXPORT_SYMBOL | ( | fcp_bus_reset | ) |
int fcp_avc_transaction | ( | struct fw_unit * | unit, |
const void * | command, | ||
unsigned int | command_size, | ||
void * | response, | ||
unsigned int | response_size, | ||
unsigned int | response_match_bytes | ||
) |
fcp_avc_transaction - send an AV/C command and wait for its response : a unit on the target device : a buffer containing the command frame; must be DMA-able : the size of : a buffer for the response frame : the maximum size of : a bitmap specifying the bytes used to detect the correct response frame
This function sends a FCP command frame to the target and waits for the corresponding response frame to be returned.
Because it is possible for multiple FCP transactions to be active at the same time, the correct response frame is detected by the value of certain bytes. These bytes must be set in before calling this function, and the corresponding bits must be set in .
and can point to the same buffer.
Asynchronous operation (INTERIM, NOTIFY) is not supported at the moment.
Returns the actual size of the response frame, or a negative error code.
fcp_bus_reset - inform the target handler about a bus reset : the unit that might be used by fcp_avc_transaction()
This function must be called from the driver's .update handler to inform the FCP transaction handler that a bus reset has happened. Any pending FCP transactions are retried.
module_exit | ( | fcp_module_exit | ) |
module_init | ( | fcp_module_init | ) |