aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 17:49:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 17:49:48 -0400
commit441c196e84b11aad3123baa9320eee7abc6b5c98 (patch)
treeea51d689c9ac09cce10a5758f19d6adbd8a7a9d7 /Documentation/ABI
parent951cc93a7493a81a47e20231441bc6cf17c98a37 (diff)
parent9a00c24ae7cb08dcd46edf1327a47871e8466444 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire: document the sysfs ABIs firewire: cdev: ABI documentation enhancements firewire: cdev: prevent race between first get_info ioctl and bus reset event queuing firewire: cdev: return -ENOTTY for unimplemented ioctls, not -EINVAL firewire: ohci: skip soft reset retries after card ejection firewire: ohci: fix PHY reg access after card ejection firewire: ohci: add a comment on PHY reg access serialization firewire: ohci: reduce potential context_stop latency firewire: ohci: remove superfluous posted write flushes firewire: net: replacing deprecated __attribute__((packed)) with __packed
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/stable/firewire-cdev103
-rw-r--r--Documentation/ABI/stable/sysfs-bus-firewire122
2 files changed, 225 insertions, 0 deletions
diff --git a/Documentation/ABI/stable/firewire-cdev b/Documentation/ABI/stable/firewire-cdev
new file mode 100644
index 000000000000..16d030827368
--- /dev/null
+++ b/Documentation/ABI/stable/firewire-cdev
@@ -0,0 +1,103 @@
1What: /dev/fw[0-9]+
2Date: May 2007
3KernelVersion: 2.6.22
4Contact: linux1394-devel@lists.sourceforge.net
5Description:
6 The character device files /dev/fw* are the interface between
7 firewire-core and IEEE 1394 device drivers implemented in
8 userspace. The ioctl(2)- and read(2)-based ABI is defined and
9 documented in <linux/firewire-cdev.h>.
10
11 This ABI offers most of the features which firewire-core also
12 exposes to kernelspace IEEE 1394 drivers.
13
14 Each /dev/fw* is associated with one IEEE 1394 node, which can
15 be remote or local nodes. Operations on a /dev/fw* file have
16 different scope:
17 - The 1394 node which is associated with the file:
18 - Asynchronous request transmission
19 - Get the Configuration ROM
20 - Query node ID
21 - Query maximum speed of the path between this node
22 and local node
23 - The 1394 bus (i.e. "card") to which the node is attached to:
24 - Isochronous stream transmission and reception
25 - Asynchronous stream transmission and reception
26 - Asynchronous broadcast request transmission
27 - PHY packet transmission and reception
28 - Allocate, reallocate, deallocate isochronous
29 resources (channels, bandwidth) at the bus's IRM
30 - Query node IDs of local node, root node, IRM, bus
31 manager
32 - Query cycle time
33 - Bus reset initiation, bus reset event reception
34 - All 1394 buses:
35 - Allocation of IEEE 1212 address ranges on the local
36 link layers, reception of inbound requests to such
37 an address range, asynchronous response transmission
38 to inbound requests
39 - Addition of descriptors or directories to the local
40 nodes' Configuration ROM
41
42 Due to the different scope of operations and in order to let
43 userland implement different access permission models, some
44 operations are restricted to /dev/fw* files that are associated
45 with a local node:
46 - Addition of descriptors or directories to the local
47 nodes' Configuration ROM
48 - PHY packet transmission and reception
49
50 A /dev/fw* file remains associated with one particular node
51 during its entire life time. Bus topology changes, and hence
52 node ID changes, are tracked by firewire-core. ABI users do not
53 need to be aware of topology.
54
55 The following file operations are supported:
56
57 open(2)
58 Currently the only useful flags are O_RDWR.
59
60 ioctl(2)
61 Initiate various actions. Some take immediate effect, others
62 are performed asynchronously while or after the ioctl returns.
63 See the inline documentation in <linux/firewire-cdev.h> for
64 descriptions of all ioctls.
65
66 poll(2), select(2), epoll_wait(2) etc.
67 Watch for events to become available to be read.
68
69 read(2)
70 Receive various events. There are solicited events like
71 outbound asynchronous transaction completion or isochronous
72 buffer completion, and unsolicited events such as bus resets,
73 request reception, or PHY packet reception. Always use a read
74 buffer which is large enough to receive the largest event that
75 could ever arrive. See <linux/firewire-cdev.h> for descriptions
76 of all event types and for which ioctls affect reception of
77 events.
78
79 mmap(2)
80 Allocate a DMA buffer for isochronous reception or transmission
81 and map it into the process address space. The arguments should
82 be used as follows: addr = NULL, length = the desired buffer
83 size, i.e. number of packets times size of largest packet,
84 prot = at least PROT_READ for reception and at least PROT_WRITE
85 for transmission, flags = MAP_SHARED, fd = the handle to the
86 /dev/fw*, offset = 0.
87
88 Isochronous reception works in packet-per-buffer fashion except
89 for multichannel reception which works in buffer-fill mode.
90
91 munmap(2)
92 Unmap the isochronous I/O buffer from the process address space.
93
94 close(2)
95 Besides stopping and freeing I/O contexts that were associated
96 with the file descriptor, back out any changes to the local
97 nodes' Configuration ROM. Deallocate isochronous channels and
98 bandwidth at the IRM that were marked for kernel-assisted
99 re- and deallocation.
100
101Users: libraw1394
102 libdc1394
103 tools like jujuutils, fwhack, ...
diff --git a/Documentation/ABI/stable/sysfs-bus-firewire b/Documentation/ABI/stable/sysfs-bus-firewire
new file mode 100644
index 000000000000..3d484e5dc846
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-bus-firewire
@@ -0,0 +1,122 @@
1What: /sys/bus/firewire/devices/fw[0-9]+/
2Date: May 2007
3KernelVersion: 2.6.22
4Contact: linux1394-devel@lists.sourceforge.net
5Description:
6 IEEE 1394 node device attributes.
7 Read-only. Mutable during the node device's lifetime.
8 See IEEE 1212 for semantic definitions.
9
10 config_rom
11 Contents of the Configuration ROM register.
12 Binary attribute; an array of host-endian u32.
13
14 guid
15 The node's EUI-64 in the bus information block of
16 Configuration ROM.
17 Hexadecimal string representation of an u64.
18
19
20What: /sys/bus/firewire/devices/fw[0-9]+/units
21Date: June 2009
22KernelVersion: 2.6.31
23Contact: linux1394-devel@lists.sourceforge.net
24Description:
25 IEEE 1394 node device attribute.
26 Read-only. Mutable during the node device's lifetime.
27 See IEEE 1212 for semantic definitions.
28
29 units
30 Summary of all units present in an IEEE 1394 node.
31 Contains space-separated tuples of specifier_id and
32 version of each unit present in the node. Specifier_id
33 and version are hexadecimal string representations of
34 u24 of the respective unit directory entries.
35 Specifier_id and version within each tuple are separated
36 by a colon.
37
38Users: udev rules to set ownership and access permissions or ACLs of
39 /dev/fw[0-9]+ character device files
40
41
42What: /sys/bus/firewire/devices/fw[0-9]+[.][0-9]+/
43Date: May 2007
44KernelVersion: 2.6.22
45Contact: linux1394-devel@lists.sourceforge.net
46Description:
47 IEEE 1394 unit device attributes.
48 Read-only. Immutable during the unit device's lifetime.
49 See IEEE 1212 for semantic definitions.
50
51 modalias
52 Same as MODALIAS in the uevent at device creation.
53
54 rom_index
55 Offset of the unit directory within the parent device's
56 (node device's) Configuration ROM, in quadlets.
57 Decimal string representation.
58
59
60What: /sys/bus/firewire/devices/*/
61Date: May 2007
62KernelVersion: 2.6.22
63Contact: linux1394-devel@lists.sourceforge.net
64Description:
65 Attributes common to IEEE 1394 node devices and unit devices.
66 Read-only. Mutable during the node device's lifetime.
67 Immutable during the unit device's lifetime.
68 See IEEE 1212 for semantic definitions.
69
70 These attributes are only created if the root directory of an
71 IEEE 1394 node or the unit directory of an IEEE 1394 unit
72 actually contains according entries.
73
74 hardware_version
75 Hexadecimal string representation of an u24.
76
77 hardware_version_name
78 Contents of a respective textual descriptor leaf.
79
80 model
81 Hexadecimal string representation of an u24.
82
83 model_name
84 Contents of a respective textual descriptor leaf.
85
86 specifier_id
87 Hexadecimal string representation of an u24.
88 Mandatory in unit directories according to IEEE 1212.
89
90 vendor
91 Hexadecimal string representation of an u24.
92 Mandatory in the root directory according to IEEE 1212.
93
94 vendor_name
95 Contents of a respective textual descriptor leaf.
96
97 version
98 Hexadecimal string representation of an u24.
99 Mandatory in unit directories according to IEEE 1212.
100
101
102What: /sys/bus/firewire/drivers/sbp2/fw*/host*/target*/*:*:*:*/ieee1394_id
103 formerly
104 /sys/bus/ieee1394/drivers/sbp2/fw*/host*/target*/*:*:*:*/ieee1394_id
105Date: Feb 2004
106KernelVersion: 2.6.4
107Contact: linux1394-devel@lists.sourceforge.net
108Description:
109 SCSI target port identifier and logical unit identifier of a
110 logical unit of an SBP-2 target. The identifiers are specified
111 in SAM-2...SAM-4 annex A. They are persistent and world-wide
112 unique properties the SBP-2 attached target.
113
114 Read-only attribute, immutable during the target's lifetime.
115 Format, as exposed by firewire-sbp2 since 2.6.22, May 2007:
116 Colon-separated hexadecimal string representations of
117 u64 EUI-64 : u24 directory_ID : u16 LUN
118 without 0x prefixes, without whitespace. The former sbp2 driver
119 (removed in 2.6.37 after being superseded by firewire-sbp2) used
120 a somewhat shorter format which was not as close to SAM.
121
122Users: udev rules to create /dev/disk/by-id/ symlinks