[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Fixed tpm_tis bug when some devices report invalid timeout values.



Sure.Â
I sent the patch using git send-email and it seems that it was not well configured to include the description and Signed-off. I will send it again.

On Wed, Oct 29, 2014 at 4:24 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
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;



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.