1/* Kernel driver for firewire 2 * 3 * Copyright (C) 2007 JiSheng Zhang <jszhang3@gmail.com>. All rights reserved 4 * Distributed under the terms of the MIT license. 5 */ 6#ifndef _FW_MODULE_H 7#define _FW_MODULE_H 8#include <KernelExport.h> 9#include <module.h> 10#include <bus_manager.h> 11 12#include "firewire.h" 13 14 15#define FIREWIRE_MODULE_NAME "bus_managers/firewire/v1" 16 17struct fw_module_info{ 18 19 bus_manager_info binfo; 20 21struct fw_device * (*fw_noderesolve_nodeid)(struct firewire_comm *fc, int dst); 22 23struct fw_device * (*fw_noderesolve_eui64)(struct firewire_comm *fc, struct fw_eui64 *eui); 24 25int (*fw_asyreq)(struct firewire_comm *fc, int sub, struct fw_xfer *xfer); 26 27void (*fw_xferwake)(struct fw_xfer *xfer); 28int (*fw_xferwait)(struct fw_xfer *xfer); 29 30struct fw_bind * (*fw_bindlookup)(struct firewire_comm *fc, uint16_t dest_hi, uint32_t dest_lo); 31 32int (*fw_bindadd)(struct firewire_comm *fc, struct fw_bind *fwb); 33 34int (*fw_bindremove)(struct firewire_comm *fc, struct fw_bind *fwb); 35 36int (*fw_xferlist_add)(struct fw_xferlist *q, 37 int slen, int rlen, int n, 38 struct firewire_comm *fc, void *sc, void (*hand)(struct fw_xfer *)); 39 40void (*fw_xferlist_remove)(struct fw_xferlist *q); 41 42struct fw_xfer * (*fw_xfer_alloc)(); 43 44struct fw_xfer * (*fw_xfer_alloc_buf)(int send_len, int recv_len); 45 46void (*fw_xfer_done)(struct fw_xfer *xfer); 47 48void (*fw_xfer_unload)(struct fw_xfer* xfer); 49 50void (*fw_xfer_free_buf)( struct fw_xfer* xfer); 51 52void (*fw_xfer_free)( struct fw_xfer* xfer); 53 54void (*fw_asy_callback_free)(struct fw_xfer *xfer); 55 56int (*fw_open_isodma)(struct firewire_comm *fc, int tx); 57 58int (*get_handle)(int socket, struct firewire_softc **handle); 59 60struct fwdma_alloc_multi * (*fwdma_malloc_multiseg)(int alignment, 61 int esize, int n); 62 63void (*fwdma_free_multiseg)(struct fwdma_alloc_multi *); 64}; 65#endif 66