diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-07-17 15:36:02 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-07-23 07:36:27 -0400 |
commit | d505e6e87127d4dbdaa5d91561eed810c180ca23 (patch) | |
tree | 590f16144d1d125f745610baae4503e2e0ae8901 /include/linux/firewire-cdev.h | |
parent | 18d0cdfd1a4cc9028c0ef80f94538b31541f8fe5 (diff) |
firewire: cdev: some clarifications to the API documentation
Response events:
- are generated on more occasions than their documentation claimed.
CSR allocation:
- An already occupied CSR can be determined from errno==EBUSY.
Bus resets:
- Note that FW_CDEV_IOC_INITIATE_BUS_RESET is nonblocking and that the
client is not required to observe a grace period since kernels
2.6.36+ will enforce it now (commit 02d37bed).
- The possible values of fw_cdev_initiate_bus_reset.type are listed in
the kerneldoc comment already.
- Clarify that an application that uses FW_CDEV_IOC_ADD_DESCRIPTOR and
FW_CDEV_IOC_REMOVE_DESCRIPTOR does not have to issue a bus reset.
Isochronous I/O contexts:
- At most one can be created per open file descriptor.
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.h | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index d31022b05bd9..fde9568151d5 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -84,8 +84,9 @@ struct fw_cdev_event_bus_reset { | |||
84 | 84 | ||
85 | /** | 85 | /** |
86 | * struct fw_cdev_event_response - Sent when a response packet was received | 86 | * struct fw_cdev_event_response - Sent when a response packet was received |
87 | * @closure: See &fw_cdev_event_common; | 87 | * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_SEND_REQUEST |
88 | * set by %FW_CDEV_IOC_SEND_REQUEST ioctl | 88 | * or %FW_CDEV_IOC_SEND_BROADCAST_REQUEST |
89 | * or %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl | ||
89 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_RESPONSE | 90 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_RESPONSE |
90 | * @rcode: Response code returned by the remote node | 91 | * @rcode: Response code returned by the remote node |
91 | * @length: Data length, i.e. the response's payload size in bytes | 92 | * @length: Data length, i.e. the response's payload size in bytes |
@@ -95,6 +96,11 @@ struct fw_cdev_event_bus_reset { | |||
95 | * sent by %FW_CDEV_IOC_SEND_REQUEST ioctl. The payload data for responses | 96 | * sent by %FW_CDEV_IOC_SEND_REQUEST ioctl. The payload data for responses |
96 | * carrying data (read and lock responses) follows immediately and can be | 97 | * carrying data (read and lock responses) follows immediately and can be |
97 | * accessed through the @data field. | 98 | * accessed through the @data field. |
99 | * | ||
100 | * The event is also generated after conclusions of transactions that do not | ||
101 | * involve response packets. This includes unified write transactions, | ||
102 | * broadcast write transactions, and transmission of asynchronous stream | ||
103 | * packets. @rcode indicates success or failure of such transmissions. | ||
98 | */ | 104 | */ |
99 | struct fw_cdev_event_response { | 105 | struct fw_cdev_event_response { |
100 | __u64 closure; | 106 | __u64 closure; |
@@ -447,7 +453,9 @@ struct fw_cdev_send_response { | |||
447 | * range to be used for later deallocation of the range. | 453 | * range to be used for later deallocation of the range. |
448 | * | 454 | * |
449 | * The address range is allocated on all local nodes. The address allocation | 455 | * The address range is allocated on all local nodes. The address allocation |
450 | * is exclusive except for the FCP command and response registers. | 456 | * is exclusive except for the FCP command and response registers. If an |
457 | * exclusive address region is already in use, the ioctl fails with errno set | ||
458 | * to %EBUSY. | ||
451 | */ | 459 | */ |
452 | struct fw_cdev_allocate { | 460 | struct fw_cdev_allocate { |
453 | __u64 offset; | 461 | __u64 offset; |
@@ -475,9 +483,14 @@ struct fw_cdev_deallocate { | |||
475 | * Initiate a bus reset for the bus this device is on. The bus reset can be | 483 | * Initiate a bus reset for the bus this device is on. The bus reset can be |
476 | * either the original (long) bus reset or the arbitrated (short) bus reset | 484 | * either the original (long) bus reset or the arbitrated (short) bus reset |
477 | * introduced in 1394a-2000. | 485 | * introduced in 1394a-2000. |
486 | * | ||
487 | * The ioctl returns immediately. A subsequent &fw_cdev_event_bus_reset | ||
488 | * indicates when the reset actually happened. Since ABI v4, this may be | ||
489 | * considerably later than the ioctl because the kernel ensures a grace period | ||
490 | * between subsequent bus resets as per IEEE 1394 bus management specification. | ||
478 | */ | 491 | */ |
479 | struct fw_cdev_initiate_bus_reset { | 492 | struct fw_cdev_initiate_bus_reset { |
480 | __u32 type; /* FW_CDEV_SHORT_RESET or FW_CDEV_LONG_RESET */ | 493 | __u32 type; |
481 | }; | 494 | }; |
482 | 495 | ||
483 | /** | 496 | /** |
@@ -501,9 +514,10 @@ struct fw_cdev_initiate_bus_reset { | |||
501 | * | 514 | * |
502 | * @immediate, @key, and @data array elements are CPU-endian quadlets. | 515 | * @immediate, @key, and @data array elements are CPU-endian quadlets. |
503 | * | 516 | * |
504 | * If successful, the kernel adds the descriptor and writes back a handle to the | 517 | * If successful, the kernel adds the descriptor and writes back a @handle to |
505 | * kernel-side object to be used for later removal of the descriptor block and | 518 | * the kernel-side object to be used for later removal of the descriptor block |
506 | * immediate key. | 519 | * and immediate key. The kernel will also generate a bus reset to signal the |
520 | * change of the configuration ROM to other nodes. | ||
507 | * | 521 | * |
508 | * This ioctl affects the configuration ROMs of all local nodes. | 522 | * This ioctl affects the configuration ROMs of all local nodes. |
509 | * The ioctl only succeeds on device files which represent a local node. | 523 | * The ioctl only succeeds on device files which represent a local node. |
@@ -522,7 +536,8 @@ struct fw_cdev_add_descriptor { | |||
522 | * descriptor was added | 536 | * descriptor was added |
523 | * | 537 | * |
524 | * Remove a descriptor block and accompanying immediate key from the local | 538 | * Remove a descriptor block and accompanying immediate key from the local |
525 | * nodes' configuration ROMs. | 539 | * nodes' configuration ROMs. The kernel will also generate a bus reset to |
540 | * signal the change of the configuration ROM to other nodes. | ||
526 | */ | 541 | */ |
527 | struct fw_cdev_remove_descriptor { | 542 | struct fw_cdev_remove_descriptor { |
528 | __u32 handle; | 543 | __u32 handle; |
@@ -554,6 +569,8 @@ struct fw_cdev_remove_descriptor { | |||
554 | * | 569 | * |
555 | * Note that the effect of a @header_size > 4 depends on | 570 | * Note that the effect of a @header_size > 4 depends on |
556 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. | 571 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. |
572 | * | ||
573 | * No more than one iso context can be created per fd. | ||
557 | */ | 574 | */ |
558 | struct fw_cdev_create_iso_context { | 575 | struct fw_cdev_create_iso_context { |
559 | __u32 type; | 576 | __u32 type; |