aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/firewire-cdev.h
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-01-07 14:14:53 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 15:56:46 -0400
commit77258da403be4cfce84b6abcdb515ad0bd1f92f1 (patch)
tree42d94b4838517c278dca54c5d3e4dba0af686271 /include/linux/firewire-cdev.h
parent36a755cfc398fc50abc74055d4478c1b067dac55 (diff)
firewire: cdev: increment fw_cdev_version, update documentation
Necessary due to Date: Tue, 22 Jul 2008 23:23:40 -0700 From: David Moore <dcm@acm.org> Subject: firewire: Include iso timestamp in headers when header_size > 4 Side note: The lack of upwards compatibility sounds worse than it is. All existing client implementations, libraw1394 and libdc1394, set header_size = 4. And since the ABI v1 behaviour does not offer any advantages over the new behaviour, we deliberately do not provide the old behaviour anymore. Also add documentation about the format of fw_cdev_get_cycle_timer which may be used in conjunction with the timestamp of iso packets but has a different format. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'include/linux/firewire-cdev.h')
-rw-r--r--include/linux/firewire-cdev.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h
index 340a78502bca..6ed9127680fd 100644
--- a/include/linux/firewire-cdev.h
+++ b/include/linux/firewire-cdev.h
@@ -138,7 +138,24 @@ struct fw_cdev_event_request {
138 * This event is sent when the controller has completed an &fw_cdev_iso_packet 138 * This event is sent when the controller has completed an &fw_cdev_iso_packet
139 * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers 139 * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers
140 * stripped of all packets up until and including the interrupt packet are 140 * stripped of all packets up until and including the interrupt packet are
141 * returned in the @header field. 141 * returned in the @header field. The amount of header data per packet is as
142 * specified at iso context creation by &fw_cdev_create_iso_context.header_size.
143 *
144 * In version 1 of this ABI, header data consisted of the 1394 isochronous
145 * packet header, followed by quadlets from the packet payload if
146 * &fw_cdev_create_iso_context.header_size > 4.
147 *
148 * In version 2 of this ABI, header data consist of the 1394 isochronous
149 * packet header, followed by a timestamp quadlet if
150 * &fw_cdev_create_iso_context.header_size > 4, followed by quadlets from the
151 * packet payload if &fw_cdev_create_iso_context.header_size > 8.
152 *
153 * Behaviour of ver. 1 of this ABI is no longer available since ABI ver. 2.
154 *
155 * Format of 1394 iso packet header: 16 bits len, 2 bits tag, 6 bits channel,
156 * 4 bits tcode, 4 bits sy, in big endian byte order. Format of timestamp:
157 * 16 bits invalid, 3 bits cycleSeconds, 13 bits cycleCount, in big endian byte
158 * order.
142 */ 159 */
143struct fw_cdev_event_iso_interrupt { 160struct fw_cdev_event_iso_interrupt {
144 __u64 closure; 161 __u64 closure;
@@ -232,11 +249,13 @@ union fw_cdev_event {
232#define FW_CDEV_IOC_GET_SPEED _IOR('#', 0x11, struct fw_cdev_get_speed) 249#define FW_CDEV_IOC_GET_SPEED _IOR('#', 0x11, struct fw_cdev_get_speed)
233#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) 250#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request)
234 251
235/* FW_CDEV_VERSION History 252/*
236 * 253 * FW_CDEV_VERSION History
237 * 1 Feb 18, 2007: Initial version. 254 * 1 (2.6.22) - initial version
255 * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if
256 * &fw_cdev_create_iso_context.header_size is 8 or more
238 */ 257 */
239#define FW_CDEV_VERSION 1 258#define FW_CDEV_VERSION 2
240 259
241/** 260/**
242 * struct fw_cdev_get_info - General purpose information ioctl 261 * struct fw_cdev_get_info - General purpose information ioctl
@@ -417,6 +436,9 @@ struct fw_cdev_remove_descriptor {
417 * 436 *
418 * If a context was successfully created, the kernel writes back a handle to the 437 * If a context was successfully created, the kernel writes back a handle to the
419 * context, which must be passed in for subsequent operations on that context. 438 * context, which must be passed in for subsequent operations on that context.
439 *
440 * Note that the effect of a @header_size > 4 depends on
441 * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt.
420 */ 442 */
421struct fw_cdev_create_iso_context { 443struct fw_cdev_create_iso_context {
422 __u32 type; 444 __u32 type;
@@ -520,6 +542,9 @@ struct fw_cdev_stop_iso {
520 * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer 542 * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer
521 * and also the system clock. This allows to express the receive time of an 543 * and also the system clock. This allows to express the receive time of an
522 * isochronous packet as a system time with microsecond accuracy. 544 * isochronous packet as a system time with microsecond accuracy.
545 *
546 * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and
547 * 12 bits cycleOffset, in host byte order.
523 */ 548 */
524struct fw_cdev_get_cycle_timer { 549struct fw_cdev_get_cycle_timer {
525 __u64 local_time; 550 __u64 local_time;