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-next>] [day] [month] [year] [list]
Date:	Thu, 23 Apr 2009 09:19:21 +1000
From:	Dave Airlie <airlied@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Jean Delvare <khali@...ux-fr.org>
Subject: i2c algo bit timeout question

Hi to any i2c people,

So I've been debugging some EDID fetching failures and wanted to ask
about the use of time_after_eq in the i2c bit banging code.

EDID specification recommends 2ms timeout for the ack on the initial
read, so we set the timeout in our code to usecs_to_jiffies(2200) (10%
margin of error). On my systems this ends up as 1, and we seem to fail
to retrieve EDID one in 10-20 times. Changing the value to 2, always
gets me the EDID I want.

So looking at drivers/i2c/algos/i2c-algo-bit.c it appears it uses
time_after_eq on jiffies, start + timeout value. So if we have a 10ms
jiffie resolution and enter this at the 9ms point in the 10ms window,
we will seem to exit the loop after 1ms instead of the minimum which I
asked for which is 2.2ms. Should this code use time_after instead of
time_after_eq?

or am I missing something else.
Dave.
--
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