aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device-cdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-device-cdev.h')
-rw-r--r--drivers/firewire/fw-device-cdev.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/firewire/fw-device-cdev.h b/drivers/firewire/fw-device-cdev.h
index 10b83222db69..72befda989ba 100644
--- a/drivers/firewire/fw-device-cdev.h
+++ b/drivers/firewire/fw-device-cdev.h
@@ -74,7 +74,13 @@
74 * event. It's a 64-bit type so that it's a fixed size type big 74 * event. It's a 64-bit type so that it's a fixed size type big
75 * enough to hold a pointer on all platforms. */ 75 * enough to hold a pointer on all platforms. */
76 76
77struct fw_cdev_event_common {
78 __u64 closure;
79 __u32 type;
80};
81
77struct fw_cdev_event_bus_reset { 82struct fw_cdev_event_bus_reset {
83 __u64 closure;
78 __u32 type; 84 __u32 type;
79 __u32 node_id; 85 __u32 node_id;
80 __u32 local_node_id; 86 __u32 local_node_id;
@@ -85,31 +91,39 @@ struct fw_cdev_event_bus_reset {
85}; 91};
86 92
87struct fw_cdev_event_response { 93struct fw_cdev_event_response {
94 __u64 closure;
88 __u32 type; 95 __u32 type;
89 __u32 rcode; 96 __u32 rcode;
90 __u64 closure;
91 __u32 length; 97 __u32 length;
92 __u32 data[0]; 98 __u32 data[0];
93}; 99};
94 100
95struct fw_cdev_event_request { 101struct fw_cdev_event_request {
102 __u64 closure;
96 __u32 type; 103 __u32 type;
97 __u32 tcode; 104 __u32 tcode;
98 __u64 offset; 105 __u64 offset;
99 __u64 closure;
100 __u32 serial; 106 __u32 serial;
101 __u32 length; 107 __u32 length;
102 __u32 data[0]; 108 __u32 data[0];
103}; 109};
104 110
105struct fw_cdev_event_iso_interrupt { 111struct fw_cdev_event_iso_interrupt {
112 __u64 closure;
106 __u32 type; 113 __u32 type;
107 __u32 cycle; 114 __u32 cycle;
108 __u64 closure;
109 __u32 header_length; /* Length in bytes of following headers. */ 115 __u32 header_length; /* Length in bytes of following headers. */
110 __u32 header[0]; 116 __u32 header[0];
111}; 117};
112 118
119union fw_cdev_event {
120 struct fw_cdev_event_common common;
121 struct fw_cdev_event_bus_reset bus_reset;
122 struct fw_cdev_event_response response;
123 struct fw_cdev_event_request request;
124 struct fw_cdev_event_iso_interrupt iso_interrupt;
125};
126
113#define FW_CDEV_IOC_GET_INFO _IO('#', 0x00) 127#define FW_CDEV_IOC_GET_INFO _IO('#', 0x00)
114#define FW_CDEV_IOC_SEND_REQUEST _IO('#', 0x01) 128#define FW_CDEV_IOC_SEND_REQUEST _IO('#', 0x01)
115#define FW_CDEV_IOC_ALLOCATE _IO('#', 0x02) 129#define FW_CDEV_IOC_ALLOCATE _IO('#', 0x02)
@@ -145,8 +159,12 @@ struct fw_cdev_get_info {
145 __u64 rom; 159 __u64 rom;
146 160
147 /* If non-zero, a fw_cdev_event_bus_reset struct will be 161 /* If non-zero, a fw_cdev_event_bus_reset struct will be
148 * copied here with the current state of the bus. */ 162 * copied here with the current state of the bus. This does
163 * not cause a bus reset to happen. The value of closure in
164 * this and sub-sequent bus reset events is set to
165 * bus_reset_closure. */
149 __u64 bus_reset; 166 __u64 bus_reset;
167 __u64 bus_reset_closure;
150 168
151 /* The index of the card this devices belongs to. */ 169 /* The index of the card this devices belongs to. */
152 __u32 card; 170 __u32 card;
@@ -212,9 +230,9 @@ struct fw_cdev_iso_packet {
212}; 230};
213 231
214struct fw_cdev_queue_iso { 232struct fw_cdev_queue_iso {
215 __u32 size;
216 __u64 packets; 233 __u64 packets;
217 __u64 data; 234 __u64 data;
235 __u32 size;
218}; 236};
219 237
220struct fw_cdev_start_iso { 238struct fw_cdev_start_iso {