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>] [day] [month] [year] [list]
Message-ID: <20080328122749.GG3613@spacedout.fries.net>
Date:	Fri, 28 Mar 2008 07:27:49 -0500
From:	David Fries <david@...es.net>
To:	linux-kernel@...r.kernel.org
Cc:	Evgeniy Polyakov <johnpol@....mipt.ru>
Subject: [PATCH 32/35] W1: ds2490.c magic number work

ds2490.c 1.16
macro name typo
s/COMM_NTP/COMM_NTF/

ds2490.c 1.7
specify the commands in ds_reset
s/0x43/COMM_1_WIRE_RESET | COMM_IM/

ds2490.c 1.18
replace magic bitmask in ds_wait_status
s/0x20/ST_IDLE/

Signed-off-by: David Fries <david@...es.net>
---
 drivers/w1/masters/ds2490.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index 2d1bdbc..1468077 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -88,7 +88,7 @@
 #define COMM_DT				0x2000
 #define COMM_SPU			0x1000
 #define COMM_F				0x0800
-#define COMM_NTP			0x0400
+#define COMM_NTF			0x0400
 #define COMM_ICP			0x0200
 #define COMM_RST			0x0100
 
@@ -439,7 +439,7 @@ static int ds_wait_status(struct ds_device *dev, struct ds_status *st)
 			printk("\n");
 		}
 #endif
-	} while(!(buf[0x08] & 0x20) && !(err < 0) && ++count < 100);
+	} while(!(buf[0x08] & ST_IDLE) && !(err < 0) && ++count < 100);
 
 	if(err>=16 && st->status & ST_EPOF) {
 		printk(KERN_INFO "Resetting device after ST_EPOF.\n");
@@ -470,7 +470,11 @@ static int ds_reset(struct ds_device *dev)
 	int err;
 
 	/*err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_F | COMM_IM | COMM_SE, SPEED_FLEXIBLE); */
-	err = ds_send_control(dev, 0x43, SPEED_NORMAL);
+	/* Add COMM_NTF to return result status.  This could initiate
+	 * a bus search if a new presense is detected, but that isn't
+	 * supported.
+	 */
+	err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_IM, SPEED_NORMAL);
 	if (err)
 		return err;
 
-- 
1.4.4.4

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ