1 #ifndef IEEE1394_RAW1394_H
2 #define IEEE1394_RAW1394_H
3
4 #define RAW1394_DEVICE_MAJOR 171
5 #define RAW1394_DEVICE_NAME "raw1394"
6
7 #define RAW1394_KERNELAPI_VERSION 4
8
9 /* state: opened */
10 #define RAW1394_REQ_INITIALIZE 1
11
12 /* state: initialized */
13 #define RAW1394_REQ_LIST_CARDS 2
14 #define RAW1394_REQ_SET_CARD 3
15
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
23 #define RAW1394_REQ_ISO_LISTEN 200
24 #define RAW1394_REQ_FCP_LISTEN 201
25 #define RAW1394_REQ_RESET_BUS 202
26
27 /* kernel to user */
28 #define RAW1394_REQ_BUS_RESET 10000
29 #define RAW1394_REQ_ISO_RECEIVE 10001
30 #define RAW1394_REQ_FCP_REQUEST 10002
31
32 /* error codes */
33 #define RAW1394_ERROR_NONE 0
34 #define RAW1394_ERROR_COMPAT (-1001)
35 #define RAW1394_ERROR_STATE_ORDER (-1002)
36 #define RAW1394_ERROR_GENERATION (-1003)
37 #define RAW1394_ERROR_INVALID_ARG (-1004)
38 #define RAW1394_ERROR_MEMFAULT (-1005)
39 #define RAW1394_ERROR_ALREADY (-1006)
40
41 #define RAW1394_ERROR_EXCESSIVE (-1020)
42 #define RAW1394_ERROR_UNTIDY_LEN (-1021)
43
44 #define RAW1394_ERROR_SEND_ERROR (-1100)
45 #define RAW1394_ERROR_ABORTED (-1101)
46 #define RAW1394_ERROR_TIMEOUT (-1102)
47
48
49 #include <asm/types.h>
50
51 struct raw1394_request {
52 __u32 type;
53 __s32 error;
54 __u32 misc;
55
56 __u32 generation;
57 __u32 length;
58
59 __u64 address;
60
61 __u64 tag;
62
63 __u64 sendb;
64 __u64 recvb;
65 };
66
67 struct raw1394_khost_list {
68 __u32 nodes;
69 __u8 name[32];
70 };
71
72 #ifdef __KERNEL__
73
74 struct iso_block_store {
75 atomic_t refcount;
76 size_t data_size;
77 quadlet_t data[0];
78 };
79
80 struct file_info {
81 struct list_head list;
82
83 enum { opened, initialized, connected } state;
84 unsigned int protocol_version;
85
86 struct hpsb_host *host;
87
88 struct list_head req_pending;
89 struct list_head req_complete;
90 struct semaphore complete_sem;
91 spinlock_t reqlists_lock;
92 wait_queue_head_t poll_wait_complete;
93
94 u8 *fcp_buffer;
95
96 u64 listen_channels;
97 quadlet_t *iso_buffer;
98 size_t iso_buffer_length;
99 };
100
101 struct pending_request {
102 struct list_head list;
103 struct file_info *file_info;
104 struct hpsb_packet *packet;
105 struct tq_struct tq;
106 struct iso_block_store *ibs;
107 quadlet_t *data;
108 int free_data;
109 struct raw1394_request req;
110 };
111
112 struct host_info {
113 struct list_head list;
114 struct hpsb_host *host;
115 struct list_head file_info_list;
116 };
117
118 #endif /* __KERNEL__ */
119
120 #endif /* IEEE1394_RAW1394_H */
121
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.