]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - Documentation/w1/w1.netlink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
[karo-tx-linux.git] / Documentation / w1 / w1.netlink
index 2756681b6ef53b8f69eea8eef8186e2ae60acd6c..f59a31965d50a38221ecd305e039d0f6319a03c7 100644 (file)
@@ -81,7 +81,7 @@ which will contain list of all registered master ids in the following
 format:
 
        cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct
-       w1_netlink_msg) plus number of masters multipled by 4)
+       w1_netlink_msg) plus number of masters multiplied by 4)
        w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to
                number of masters multiplied by 4 (u32 size))
        id0 ... idN
@@ -118,6 +118,35 @@ W1 reset command.
        id is equal to the bus master id to use for searching]
   [w1_netlink_cmd cmd = W1_CMD_RESET]
 
+
+Command status replies.
+======================
+
+Each command (either root, master or slave with or without w1_netlink_cmd
+structure) will be 'acked' by the w1 core. Format of the reply is the same
+as request message except that length parameters do not account for data
+requested by the user, i.e. read/write/touch IO requests will not contain
+data, so w1_netlink_cmd.len will be 0, w1_netlink_msg.len will be size
+of the w1_netlink_cmd structure and cn_msg.len will be equal to the sum
+of the sizeof(struct w1_netlink_msg) and sizeof(struct w1_netlink_cmd).
+If reply is generated for master or root command (which do not have
+w1_netlink_cmd attached), reply will contain only cn_msg and w1_netlink_msg
+structires.
+
+w1_netlink_msg.status field will carry positive error value
+(EINVAL for example) or zero in case of success.
+
+All other fields in every structure will mirror the same parameters in the
+request message (except lengths as described above).
+
+Status reply is generated for every w1_netlink_cmd embedded in the
+w1_netlink_msg, if there are no w1_netlink_cmd structures,
+reply will be generated for the w1_netlink_msg.
+
+All w1_netlink_cmd command structures are handled in every w1_netlink_msg,
+even if there were errors, only length mismatch interrupts message processing.
+
+
 Operation steps in w1 core when new command is received.
 =======================================================