1 #ifndef IEEE1394_RAW1394_H
2 #define IEEE1394_RAW1394_H
4 #define RAW1394_DEVICE_MAJOR 171
5 #define RAW1394_DEVICE_NAME "raw1394"
7 #define RAW1394_KERNELAPI_VERSION 4
10 #define RAW1394_REQ_INITIALIZE 1
12 /* state: initialized */
13 #define RAW1394_REQ_LIST_CARDS 2
14 #define RAW1394_REQ_SET_CARD 3
16 /* state: connected */
17 #define RAW1394_REQ_ASYNC_READ 100
18 #define RAW1394_REQ_ASYNC_WRITE 101
19 #define RAW1394_REQ_LOCK 102
20 #define RAW1394_REQ_LOCK64 103
21 #define RAW1394_REQ_ISO_SEND 104
22 #define RAW1394_REQ_ASYNC_SEND 105
24 #define RAW1394_REQ_ISO_LISTEN 200
25 #define RAW1394_REQ_FCP_LISTEN 201
26 #define RAW1394_REQ_RESET_BUS 202
27 #define RAW1394_REQ_GET_ROM 203
28 #define RAW1394_REQ_UPDATE_ROM 204
29 #define RAW1394_REQ_ECHO 205
31 #define RAW1394_REQ_ARM_REGISTER 300
32 #define RAW1394_REQ_ARM_UNREGISTER 301
34 #define RAW1394_REQ_RESET_NOTIFY 400
36 #define RAW1394_REQ_PHYPACKET 500
39 #define RAW1394_REQ_BUS_RESET 10000
40 #define RAW1394_REQ_ISO_RECEIVE 10001
41 #define RAW1394_REQ_FCP_REQUEST 10002
42 #define RAW1394_REQ_ARM 10003
45 #define RAW1394_ERROR_NONE 0
46 #define RAW1394_ERROR_COMPAT (-1001)
47 #define RAW1394_ERROR_STATE_ORDER (-1002)
48 #define RAW1394_ERROR_GENERATION (-1003)
49 #define RAW1394_ERROR_INVALID_ARG (-1004)
50 #define RAW1394_ERROR_MEMFAULT (-1005)
51 #define RAW1394_ERROR_ALREADY (-1006)
53 #define RAW1394_ERROR_EXCESSIVE (-1020)
54 #define RAW1394_ERROR_UNTIDY_LEN (-1021)
56 #define RAW1394_ERROR_SEND_ERROR (-1100)
57 #define RAW1394_ERROR_ABORTED (-1101)
58 #define RAW1394_ERROR_TIMEOUT (-1102)
65 #define RAW1394_LONG_RESET 0
66 #define RAW1394_SHORT_RESET 1
68 /* busresetnotify ... */
69 #define RAW1394_NOTIFY_OFF 0
70 #define RAW1394_NOTIFY_ON 1
72 #include <asm/types.h>
74 struct raw1394_request {
90 struct raw1394_khost_list {
95 typedef struct arm_request {
96 nodeid_t destination_nodeid;
97 nodeid_t source_nodeid;
98 nodeaddr_t destination_offset;
101 u_int8_t extended_transaction_code;
102 u_int32_t generation;
103 arm_length_t buffer_length;
107 typedef struct arm_response {
109 arm_length_t buffer_length;
113 typedef struct arm_request_response {
114 struct arm_request *request;
115 struct arm_response *response;
116 } *arm_request_response_t;
120 struct iso_block_store {
127 struct list_head list;
129 enum { opened, initialized, connected } state;
130 unsigned int protocol_version;
132 struct hpsb_host *host;
134 struct list_head req_pending;
135 struct list_head req_complete;
136 struct semaphore complete_sem;
137 spinlock_t reqlists_lock;
138 wait_queue_head_t poll_wait_complete;
140 struct list_head addr_list;
145 quadlet_t *iso_buffer;
146 size_t iso_buffer_length;
148 u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
152 struct list_head addr_list; /* file_info list */
156 u8 notification_options;
157 u8 client_transactions;
160 u8 *addr_space_buffer; /* accessed by read/write/lock */
163 struct pending_request {
164 struct list_head list;
165 struct file_info *file_info;
166 struct hpsb_packet *packet;
167 struct hpsb_queue_struct tq;
168 struct iso_block_store *ibs;
171 struct raw1394_request req;
175 struct list_head list;
176 struct hpsb_host *host;
177 struct list_head file_info_list;
180 #endif /* __KERNEL__ */
182 #endif /* IEEE1394_RAW1394_H */