1 #ifndef IEEE1394_RAW1394_H
2 #define IEEE1394_RAW1394_H
4 /* header for the raw1394 API that is exported to user-space */
6 #define RAW1394_KERNELAPI_VERSION 4
9 #define RAW1394_REQ_INITIALIZE 1
11 /* state: initialized */
12 #define RAW1394_REQ_LIST_CARDS 2
13 #define RAW1394_REQ_SET_CARD 3
15 /* state: connected */
16 #define RAW1394_REQ_ASYNC_READ 100
17 #define RAW1394_REQ_ASYNC_WRITE 101
18 #define RAW1394_REQ_LOCK 102
19 #define RAW1394_REQ_LOCK64 103
20 #define RAW1394_REQ_ISO_SEND 104
21 #define RAW1394_REQ_ASYNC_SEND 105
22 #define RAW1394_REQ_ASYNC_STREAM 106
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
30 #define RAW1394_REQ_MODIFY_ROM 206
32 #define RAW1394_REQ_ARM_REGISTER 300
33 #define RAW1394_REQ_ARM_UNREGISTER 301
34 #define RAW1394_REQ_ARM_SET_BUF 302
35 #define RAW1394_REQ_ARM_GET_BUF 303
37 #define RAW1394_REQ_RESET_NOTIFY 400
39 #define RAW1394_REQ_PHYPACKET 500
42 #define RAW1394_REQ_BUS_RESET 10000
43 #define RAW1394_REQ_ISO_RECEIVE 10001
44 #define RAW1394_REQ_FCP_REQUEST 10002
45 #define RAW1394_REQ_ARM 10003
46 #define RAW1394_REQ_RAWISO_ACTIVITY 10004
49 #define RAW1394_ERROR_NONE 0
50 #define RAW1394_ERROR_COMPAT (-1001)
51 #define RAW1394_ERROR_STATE_ORDER (-1002)
52 #define RAW1394_ERROR_GENERATION (-1003)
53 #define RAW1394_ERROR_INVALID_ARG (-1004)
54 #define RAW1394_ERROR_MEMFAULT (-1005)
55 #define RAW1394_ERROR_ALREADY (-1006)
57 #define RAW1394_ERROR_EXCESSIVE (-1020)
58 #define RAW1394_ERROR_UNTIDY_LEN (-1021)
60 #define RAW1394_ERROR_SEND_ERROR (-1100)
61 #define RAW1394_ERROR_ABORTED (-1101)
62 #define RAW1394_ERROR_TIMEOUT (-1102)
69 #define RAW1394_LONG_RESET 0
70 #define RAW1394_SHORT_RESET 1
72 /* busresetnotify ... */
73 #define RAW1394_NOTIFY_OFF 0
74 #define RAW1394_NOTIFY_ON 1
76 #include <asm/types.h>
78 struct raw1394_request
{
94 struct raw1394_khost_list
{
99 typedef struct arm_request
{
100 __u16 destination_nodeid
;
102 __u64 destination_offset
;
105 __u8 extended_transaction_code
;
111 typedef struct arm_response
{
117 typedef struct arm_request_response
{
118 struct arm_request __user
*request
;
119 struct arm_response __user
*response
;
120 } *arm_request_response_t
;
123 #include "ieee1394-ioctl.h"
125 /* per-packet metadata embedded in the ringbuffer */
126 /* must be identical to hpsb_iso_packet_info in iso.h! */
127 struct raw1394_iso_packet_info
{
130 __u16 cycle
; /* recv only */
131 __u8 channel
; /* recv only */
136 /* argument for RAW1394_ISO_RECV/XMIT_PACKETS ioctls */
137 struct raw1394_iso_packets
{
139 struct raw1394_iso_packet_info __user
*infos
;
142 struct raw1394_iso_config
{
143 /* size of packet data buffer, in bytes (will be rounded up to PAGE_SIZE) */
146 /* # of packets to buffer */
149 /* iso channel (set to -1 for multi-channel recv) */
152 /* xmit only - iso transmission speed */
155 /* The mode of the dma when receiving iso data. Must be supported by chip */
158 /* max. latency of buffer, in packets (-1 if you don't care) */
162 /* argument to RAW1394_ISO_XMIT/RECV_INIT and RAW1394_ISO_GET_STATUS */
163 struct raw1394_iso_status
{
164 /* current settings */
165 struct raw1394_iso_config config
;
167 /* number of packets waiting to be filled with data (ISO transmission)
168 or containing data received (ISO reception) */
171 /* approximate number of packets dropped due to overflow or
172 underflow of the packet buffer (a value of zero guarantees
173 that no packets have been dropped) */
176 /* cycle number at which next packet will be transmitted;
181 /* argument to RAW1394_IOC_GET_CYCLE_TIMER ioctl */
182 struct raw1394_cycle_timer
{
183 /* contents of Isochronous Cycle Timer register,
184 as in OHCI 1.1 clause 5.13 (also with non-OHCI hosts) */
187 /* local time in microseconds since Epoch,
188 simultaneously read with cycle timer */
191 #endif /* IEEE1394_RAW1394_H */