diff options
author | Evgeniy Polyakov <zbr@ioremap.net> | 2009-01-07 21:09:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:14 -0500 |
commit | 4037014e3fb71e998189374e19ca141c59d15323 (patch) | |
tree | c422a2c48bfa7b702a5e3927475cc3cb1bffc928 /Documentation/w1/w1.netlink | |
parent | f89735c4e281e8642907b38640c076ae5048f3a6 (diff) |
w1: send status messages after command processing
Send completion status of the commands to the userspace. Message and
protocol are described in the documentation.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Paul Alfille <paul.alfille@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/w1/w1.netlink')
-rw-r--r-- | Documentation/w1/w1.netlink | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink index 2756681b6ef5..804445f745ed 100644 --- a/Documentation/w1/w1.netlink +++ b/Documentation/w1/w1.netlink | |||
@@ -118,6 +118,35 @@ W1 reset command. | |||
118 | id is equal to the bus master id to use for searching] | 118 | id is equal to the bus master id to use for searching] |
119 | [w1_netlink_cmd cmd = W1_CMD_RESET] | 119 | [w1_netlink_cmd cmd = W1_CMD_RESET] |
120 | 120 | ||
121 | |||
122 | Command status replies. | ||
123 | ====================== | ||
124 | |||
125 | Each command (either root, master or slave with or without w1_netlink_cmd | ||
126 | structure) will be 'acked' by the w1 core. Format of the reply is the same | ||
127 | as request message except that length parameters do not account for data | ||
128 | requested by the user, i.e. read/write/touch IO requests will not contain | ||
129 | data, so w1_netlink_cmd.len will be 0, w1_netlink_msg.len will be size | ||
130 | of the w1_netlink_cmd structure and cn_msg.len will be equal to the sum | ||
131 | of the sizeof(struct w1_netlink_msg) and sizeof(struct w1_netlink_cmd). | ||
132 | If reply is generated for master or root command (which do not have | ||
133 | w1_netlink_cmd attached), reply will contain only cn_msg and w1_netlink_msg | ||
134 | structires. | ||
135 | |||
136 | w1_netlink_msg.status field will carry positive error value | ||
137 | (EINVAL for example) or zero in case of success. | ||
138 | |||
139 | All other fields in every structure will mirror the same parameters in the | ||
140 | request message (except lengths as described above). | ||
141 | |||
142 | Status reply is generated for every w1_netlink_cmd embedded in the | ||
143 | w1_netlink_msg, if there are no w1_netlink_cmd structures, | ||
144 | reply will be generated for the w1_netlink_msg. | ||
145 | |||
146 | All w1_netlink_cmd command structures are handled in every w1_netlink_msg, | ||
147 | even if there were errors, only length mismatch interrupts message processing. | ||
148 | |||
149 | |||
121 | Operation steps in w1 core when new command is received. | 150 | Operation steps in w1 core when new command is received. |
122 | ======================================================= | 151 | ======================================================= |
123 | 152 | ||