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 17 struct fw_module_info{ 18 19 bus_manager_info binfo; 20 21 struct fw_device * (*fw_noderesolve_nodeid)(struct firewire_comm *fc, int dst); 22 23 struct fw_device * (*fw_noderesolve_eui64)(struct firewire_comm *fc, struct fw_eui64 *eui); 24 25 int (*fw_asyreq)(struct firewire_comm *fc, int sub, struct fw_xfer *xfer); 26 27 void (*fw_xferwake)(struct fw_xfer *xfer); 28 int (*fw_xferwait)(struct fw_xfer *xfer); 29 30 struct fw_bind * (*fw_bindlookup)(struct firewire_comm *fc, uint16_t dest_hi, uint32_t dest_lo); 31 32 int (*fw_bindadd)(struct firewire_comm *fc, struct fw_bind *fwb); 33 34 int (*fw_bindremove)(struct firewire_comm *fc, struct fw_bind *fwb); 35 36 int (*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 40 void (*fw_xferlist_remove)(struct fw_xferlist *q); 41 42 struct fw_xfer * (*fw_xfer_alloc)(); 43 44 struct fw_xfer * (*fw_xfer_alloc_buf)(int send_len, int recv_len); 45 46 void (*fw_xfer_done)(struct fw_xfer *xfer); 47 48 void (*fw_xfer_unload)(struct fw_xfer* xfer); 49 50 void (*fw_xfer_free_buf)( struct fw_xfer* xfer); 51 52 void (*fw_xfer_free)( struct fw_xfer* xfer); 53 54 void (*fw_asy_callback_free)(struct fw_xfer *xfer); 55 56 int (*fw_open_isodma)(struct firewire_comm *fc, int tx); 57 58 int (*get_handle)(int socket, struct firewire_softc **handle); 59 60 struct fwdma_alloc_multi * (*fwdma_malloc_multiseg)(int alignment, 61 int esize, int n); 62 63 void (*fwdma_free_multiseg)(struct fwdma_alloc_multi *); 64 }; 65 #endif 66