#include <linux/device.h>
#include <linux/firewire.h>
#include <linux/firewire-constants.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/delay.h>
#include "fcp.h"
#include "lib.h"
#include "amdtp-stream.h"
#define CTS_AVC …
#define ERROR_RETRIES …
#define ERROR_DELAY_MS …
#define FCP_TIMEOUT_MS …
int avc_general_set_sig_fmt(struct fw_unit *unit, unsigned int rate,
enum avc_general_plug_dir dir,
unsigned short pid)
{ … }
EXPORT_SYMBOL(…);
int avc_general_get_sig_fmt(struct fw_unit *unit, unsigned int *rate,
enum avc_general_plug_dir dir,
unsigned short pid)
{ … }
EXPORT_SYMBOL(…);
int avc_general_get_plug_info(struct fw_unit *unit, unsigned int subunit_type,
unsigned int subunit_id, unsigned int subfunction,
u8 info[AVC_PLUG_INFO_BUF_BYTES])
{ … }
EXPORT_SYMBOL(…);
static DEFINE_SPINLOCK(transactions_lock);
static LIST_HEAD(transactions);
enum fcp_state { … };
struct fcp_transaction { … };
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(…);
void fcp_bus_reset(struct fw_unit *unit)
{ … }
EXPORT_SYMBOL(…);
static bool is_matching_response(struct fcp_transaction *transaction,
const void *response, size_t length)
{ … }
static void fcp_response(struct fw_card *card, struct fw_request *request,
int tcode, int destination, int source,
int generation, unsigned long long offset,
void *data, size_t length, void *callback_data)
{ … }
static struct fw_address_handler response_register_handler = …;
static int __init fcp_module_init(void)
{ … }
static void __exit fcp_module_exit(void)
{ … }
module_init(…) …;
module_exit(fcp_module_exit);