Nayna Jain 5ef924d9e2 tpm: use tpm_msleep() value as max delay
Currently, tpm_msleep() uses delay_msec as the minimum value in
usleep_range. However, that is the maximum time we want to wait.
The function is modified to use the delay_msec as the maximum
value, not the minimum value.

After this change, performance on a TPM 1.2 with an 8 byte
burstcount for 1000 extends improved from ~9sec to ~8sec.

Fixes: 3b9af007869("tpm: replace msleep() with usleep_range() in TPM 1.2/
2.0 generic drivers")

Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
2018-01-08 12:58:33 +02:00
..
2017-11-16 09:10:59 -08:00
2017-08-28 17:11:28 +02:00
2011-03-31 11:26:23 -03:00
2017-07-17 17:23:17 +02:00
2016-01-22 18:04:28 -05:00
2017-11-15 18:21:04 -08:00
2011-01-10 08:51:44 -08:00
2017-09-12 13:30:06 -07:00