lkml.org 
[lkml]   [2008]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.6.26-mmotm tpm-correct-tpm-timeouts-to-jiffies-conversion-d820-fix.patch
2008/7/26  <Valdis.Kletnieks@vt.edu>:
> + if (chip->vendor.duration[TPM_SHORT] == 1)
> + chip->vendor.duration[TPM_SHORT] *= 1000;
> +
> chip->vendor.duration[TPM_MEDIUM] =
> usecs_to_jiffies(be32_to_cpu
> (*((__be32 *) (data +


Value in chip->vendor.duration[TPM_SHORT] is in jiffies not in milliseconds.
(As I know it's not the same. Jiffy is in range 1-10 ms.)
I know the result may be the same, but it is unclear.

Maybe... value should be compared (to 1000) before conversion?
or...
If after conversion, there should be something like this:
if (chip->vendor.duration[TPM_SHORT] < (HZ/100)) /* less
than 10ms ? */
chip->vendor.duration[TPM_SHORT] = HZ;

What do you think?

Regards
Marcin


\
 
 \ /
  Last update: 2008-07-26 21:29    [W:0.081 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site