more debug output
[linux-2.4.git] / drivers / ieee1394 / raw1394-private.h
1 #ifndef IEEE1394_RAW1394_PRIVATE_H
2 #define IEEE1394_RAW1394_PRIVATE_H
3
4 /* header for definitions that are private to the raw1394 driver
5    and not visible to user-space */
6
7 #define RAW1394_DEVICE_MAJOR      171
8 #define RAW1394_DEVICE_NAME       "raw1394"
9
10 struct iso_block_store {
11         atomic_t refcount;
12         size_t data_size;
13         quadlet_t data[0];
14 };
15
16 enum raw1394_iso_state { RAW1394_ISO_INACTIVE = 0,
17                          RAW1394_ISO_RECV = 1,
18                          RAW1394_ISO_XMIT = 2 };
19
20 struct file_info {
21         struct list_head list;
22
23         enum { opened, initialized, connected } state;
24         unsigned int protocol_version;
25
26         struct hpsb_host *host;
27
28         struct list_head req_pending;
29         struct list_head req_complete;
30         struct semaphore complete_sem;
31         spinlock_t reqlists_lock;
32         wait_queue_head_t poll_wait_complete;
33
34         struct list_head addr_list;           
35
36         u8 *fcp_buffer;
37
38         /* old ISO API */
39         u64 listen_channels;
40         quadlet_t *iso_buffer;
41         size_t iso_buffer_length;
42
43         u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
44
45         /* new rawiso API */
46         enum raw1394_iso_state iso_state;
47         struct hpsb_iso *iso_handle;
48 };
49
50 struct arm_addr {
51         struct list_head addr_list; /* file_info list */
52         u64    start, end;
53         u64    arm_tag;
54         u8     access_rights;
55         u8     notification_options;
56         u8     client_transactions;
57         u64    recvb;
58         u16    rec_length;
59         u8     *addr_space_buffer; /* accessed by read/write/lock */
60 };
61
62 struct pending_request {
63         struct list_head list;
64         struct file_info *file_info;
65         struct hpsb_packet *packet;
66         struct iso_block_store *ibs;
67         quadlet_t *data;
68         int free_data;
69         struct raw1394_request req;
70 };
71
72 struct host_info {
73         struct list_head list;
74         struct hpsb_host *host;
75         struct list_head file_info_list;
76 };
77
78 #endif  /* IEEE1394_RAW1394_PRIVATE_H */