lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1229450882-745-4-git-send-email-zbr@ioremap.net>
Date:	Tue, 16 Dec 2008 21:08:01 +0300
From:	Evgeniy Polyakov <zbr@...emap.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, Evgeniy Polyakov <zbr@...emap.net>
Subject: [w1] Added w1 reset command.

Command which allows to reset the bus.

Signed-off-by: Evgeniy Polyakov <zbr@...emap.net>
---
 Documentation/w1/w1.netlink |    6 ++++++
 drivers/w1/w1_netlink.c     |    3 +++
 drivers/w1/w1_netlink.h     |    1 +
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink
index 4560180..25721af 100644
--- a/Documentation/w1/w1.netlink
+++ b/Documentation/w1/w1.netlink
@@ -112,6 +112,12 @@ cn_msg->len = sizeof(struct w1_netlink_msg) +
 	      sizeof(struct w1_netlink_cmd) +
 	      N*8;
 
+W1 reset command.
+[cn_msg]
+  [w1_netlink_msg type = W1_MASTER_CMD
+  	id is equal to the bus master id to use for searching]
+  [w1_netlink_cmd cmd = W1_CMD_RESET]
+
 Operation steps in w1 core when new command is received.
 =======================================================
 
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index 0267fe4..e807265 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -197,6 +197,9 @@ static int w1_process_command_master(struct w1_master *dev, struct cn_msg *req_m
 		case W1_CMD_TOUCH:
 			err = w1_process_command_io(dev, msg, hdr, cmd);
 			break;
+		case W1_CMD_RESET:
+			err = w1_reset_bus(dev);
+			break;
 		default:
 			cmd->res = EINVAL;
 			cn_netlink_send(msg, 0, GFP_KERNEL);
diff --git a/drivers/w1/w1_netlink.h b/drivers/w1/w1_netlink.h
index 01d86a7..68a4ff4 100644
--- a/drivers/w1/w1_netlink.h
+++ b/drivers/w1/w1_netlink.h
@@ -58,6 +58,7 @@ enum w1_commands {
 	W1_CMD_SEARCH,
 	W1_CMD_ALARM_SEARCH,
 	W1_CMD_TOUCH,
+	W1_CMD_RESET,
 	W1_CMD_MAX,
 };
 
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ