From: Ian Campbell <Ian.Campbell@citrix.com>
To: Emil Condrea <emilcondrea@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] Fixed tpm_tis bug when some devices report invalid timeout values.
Date: Wed, 29 Oct 2014 14:24:43 +0000 [thread overview]
Message-ID: <1414592683.29580.3.camel@citrix.com> (raw)
In-Reply-To: <1414603685-31671-2-git-send-email-emilcondrea@gmail.com>
On Wed, 2014-10-29 at 19:28 +0200, Emil Condrea wrote:
Thanks.
Please see http://wiki.xen.org/wiki/Submitting_Xen_Patches which
describes some of the requirements for submitting a patch. In particular
we need a Signed-off-by in order to accept a contribution, but also note
the bit about CCing the relevant maintainer and the bit about what a
good changelog entry might contain.
Thanks,
Ian.
> ---
> extras/mini-os/tpm_tis.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/extras/mini-os/tpm_tis.c b/extras/mini-os/tpm_tis.c
> index b067cb7..81d426a 100644
> --- a/extras/mini-os/tpm_tis.c
> +++ b/extras/mini-os/tpm_tis.c
> @@ -33,6 +33,11 @@
> #ifndef min
> #define min( a, b ) ( ((a) < (b)) ? (a) : (b) )
> #endif
> +#define ADJUST_TIMEOUTS_TO_STANDARD(initial,standard,timeout_no) \
> + if((initial) < (standard)){ \
> + (initial) = (standard); \
> + printk("Timeout %c was adjusted to standard value.\n",timeout_no); \
> + }
>
> #define TPM_HEADER_SIZE 10
>
> @@ -997,15 +1002,22 @@ int tpm_get_timeouts(struct tpm_chip *chip)
> }
> if (timeout)
> chip->timeout_a = MICROSECS(timeout * scale); /*Convert to msec */
> + ADJUST_TIMEOUTS_TO_STANDARD(chip->timeout_a,MILLISECS(TIS_SHORT_TIMEOUT),'a');
> +
> timeout = be32_to_cpu(timeout_cap->b);
> if (timeout)
> chip->timeout_b = MICROSECS(timeout * scale); /*Convert to msec */
> + ADJUST_TIMEOUTS_TO_STANDARD(chip->timeout_b,MILLISECS(TIS_LONG_TIMEOUT),'b');
> +
> timeout = be32_to_cpu(timeout_cap->c);
> if (timeout)
> chip->timeout_c = MICROSECS(timeout * scale); /*Convert to msec */
> + ADJUST_TIMEOUTS_TO_STANDARD(chip->timeout_c,MILLISECS(TIS_SHORT_TIMEOUT),'c');
> +
> timeout = be32_to_cpu(timeout_cap->d);
> if (timeout)
> chip->timeout_d = MICROSECS(timeout * scale); /*Convert to msec */
> + ADJUST_TIMEOUTS_TO_STANDARD(chip->timeout_d,MILLISECS(TIS_SHORT_TIMEOUT),'d');
>
> duration:
> tpm_cmd.header.in = tpm_getcap_header;
next prev parent reply other threads:[~2014-10-29 14:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 17:28 [PATCH] Fixed tpm_tis bug when some devices report invalid timeout Emil Condrea
2014-10-29 17:28 ` [PATCH] Fixed tpm_tis bug when some devices report invalid timeout values Emil Condrea
2014-10-29 14:24 ` Ian Campbell [this message]
2014-10-30 8:57 ` Emil Condrea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1414592683.29580.3.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=emilcondrea@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.