From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Ed Swierk <eswierk-FilZDy9cOaHkQYj/0HfcvtBPR1lH4CV8@public.gmane.org>
Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH v3 3/4] tpm: Allow TPM chip drivers to override reported command durations
Date: Tue, 7 Jun 2016 11:32:35 -0600 [thread overview]
Message-ID: <20160607173235.GA4486@obsidianresearch.com> (raw)
In-Reply-To: <CAO_EM_k5pqxqZ2fFzDBhPK_WoZ_nj3qE18EKROUKvp3KxnK__Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, Jun 07, 2016 at 07:25:24AM -0700, Ed Swierk wrote:
> I followed the example of the existing update_timeouts callback, which
> is also used only by tpm_tis.
The callback is because only TIS has the did_vid stuff which is needed
to key the adjustment. Other interfaces do not have that information.
This was an ugly historical mistake:
> >> - /* The Broadcom BCM0102 chipset in a Dell Latitude D820 gets the above
> >> - * value wrong and apparently reports msecs rather than usecs. So we
> >> - * fix up the resulting too-small TPM_SHORT value to make things work.
> >> - * We also scale the TPM_MEDIUM and -_LONG values by 1000.
> >> - */
> >> - if (chip->vendor.duration[TPM_SHORT] < (HZ / 100)) {
> >> - chip->vendor.duration[TPM_SHORT] = HZ;
> >> - chip->vendor.duration[TPM_MEDIUM] *= 1000;
> >> - chip->vendor.duration[TPM_LONG] *= 1000;
> >> - chip->vendor.duration_adjusted = true;
It should have been did/vid key'd as well, not heuristic.
Can the existing update_timeouts be broadened to do both adjustments,
or do they really need to be at different times?
Jason
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
next prev parent reply other threads:[~2016-06-07 17:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 3:37 [PATCH v3 0/4] tpm: Command duration logging and chip-specific override Ed Swierk
[not found] ` <1465270649-22498-1-git-send-email-eswierk-FilZDy9cOaHkQYj/0HfcvtBPR1lH4CV8@public.gmane.org>
2016-06-07 3:37 ` [PATCH v3 1/4] tpm_tis: Improve reporting of IO errors Ed Swierk
2016-06-07 13:56 ` [tpmdd-devel] " Jarkko Sakkinen
2016-06-07 3:37 ` [PATCH v3 2/4] tpm: Add optional logging of TPM command durations Ed Swierk
2016-06-07 14:01 ` [tpmdd-devel] " Jarkko Sakkinen
2016-06-07 3:37 ` [PATCH v3 3/4] tpm: Allow TPM chip drivers to override reported " Ed Swierk
[not found] ` <1465270649-22498-4-git-send-email-eswierk-FilZDy9cOaHkQYj/0HfcvtBPR1lH4CV8@public.gmane.org>
2016-06-07 14:15 ` Jarkko Sakkinen
[not found] ` <20160607141526.GG3855-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-07 14:25 ` Ed Swierk
[not found] ` <CAO_EM_k5pqxqZ2fFzDBhPK_WoZ_nj3qE18EKROUKvp3KxnK__Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-07 17:32 ` Jason Gunthorpe [this message]
[not found] ` <20160607173235.GA4486-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-06-10 8:25 ` Jarkko Sakkinen
2016-06-07 3:37 ` [PATCH v3 4/4] tpm_tis: Increase ST19NP18 TPM command duration to avoid chip lockup Ed Swierk
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=20160607173235.GA4486@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=eswierk-FilZDy9cOaHkQYj/0HfcvtBPR1lH4CV8@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.