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: <20080308043728.GA23298@spacedout.fries.net>
Date:	Fri, 7 Mar 2008 22:37:37 -0600
From:	David Fries <david@...es.net>
To:	linux-kernel@...r.kernel.org
Cc:	Anton Vorontsov <cbouatmailru@...il.com>,
	Matt Reimer <mreimer@...p.net>
Subject: [W1] ds1wm: testers please, msleep not udelay

I'm working on some patches to the one wire system I just need to
split them into small logical patches.  I don't have the hardware to
test this ds1wm change.  I wouldn't expect the delay here to be
critical, and on a handheld platform, I wouldn't think busywaiting for
such a long time to be a good idea.  I also wouldn't expect putting
off reading the battery status a timer tick to matter much, so why not
sleep?

So, if someone would try out the patch and report back or tell me why
it's wrong I would appreciate it.  If it looks good I'll submit the
patch with the rest of the one wire changes I'm working on.

Index: drivers/w1/masters/ds1wm.c
===================================================================
RCS file: /home/david/kernel/k/spacedout/patches/linux/drivers/w1/masters/ds1wm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- drivers/w1/masters/ds1wm.c	2 Feb 2008 18:37:24 -0000	1.3
+++ drivers/w1/masters/ds1wm.c	15 Feb 2008 03:42:36 -0000	1.4
@@ -159,8 +159,10 @@ static int ds1wm_reset(struct ds1wm_data
 	 *     625 us - 60 us - 240 us - 100 ns = 324.9 us
 	 *
 	 * We'll wait a bit longer just to be sure.
+	 * Was udelay(500), but if it is going to busywait the cpu that long,
+	 * might as well come back later.
 	 */
-	udelay(500);
+	msleep(1);
 
 	ds1wm_write_register(ds1wm_data, DS1WM_INT_EN,
 		DS1WM_INTEN_ERBF | DS1WM_INTEN_ETMT | DS1WM_INTEN_EPD |

-- 
David Fries <david@...es.net>
http://fries.net/~david/ (PGP encryption key available)
--
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