* [PATCH] tpm_tis: rename TPM_TIS_ITPM_POSSIBLE to TPM_TIS_ITPM_WORKAROUND
@ 2017-01-12 22:04 Maciej S. Szmigiero
2017-01-13 15:51 ` Jarkko Sakkinen
0 siblings, 1 reply; 2+ messages in thread
From: Maciej S. Szmigiero @ 2017-01-12 22:04 UTC (permalink / raw)
To: tpmdd-devel
Cc: linux-kernel, Peter Huewe, Marcel Selhorst, Jarkko Sakkinen,
Christophe Ricard, Jason Gunthorpe
Rename TPM_TIS_ITPM_POSSIBLE to TPM_TIS_ITPM_WORKAROUND since it gives a
better idea what this flag actually does.
Suggested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
---
This needs "tpm_tis: fix iTPM probe via probe_itpm() function"
applied first.
drivers/char/tpm/tpm_tis.c | 2 +-
drivers/char/tpm/tpm_tis_core.c | 8 ++++----
drivers/char/tpm/tpm_tis_core.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 0127af130cb1..7912dadc39be 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -159,7 +159,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info,
irq = tpm_info->irq;
if (itpm)
- phy->priv.flags |= TPM_TIS_ITPM_POSSIBLE;
+ phy->priv.flags |= TPM_TIS_ITPM_WORKAROUND;
return tpm_tis_core_init(dev, &phy->priv, irq, &tpm_tcg,
acpi_dev_handle);
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 401f1228547c..b6d2a6d474d2 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -264,7 +264,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
int rc, status, burstcnt;
size_t count = 0;
- bool itpm = priv->flags & TPM_TIS_ITPM_POSSIBLE;
+ bool itpm = priv->flags & TPM_TIS_ITPM_WORKAROUND;
if (request_locality(chip, 0) < 0)
return -EBUSY;
@@ -467,7 +467,7 @@ static int probe_itpm(struct tpm_chip *chip)
size_t len = sizeof(cmd_getticks);
u16 vendor;
- if (priv->flags & TPM_TIS_ITPM_POSSIBLE)
+ if (priv->flags & TPM_TIS_ITPM_WORKAROUND)
return 0;
rc = tpm_tis_read16(priv, TPM_DID_VID(0), &vendor);
@@ -485,13 +485,13 @@ static int probe_itpm(struct tpm_chip *chip)
tpm_tis_ready(chip);
release_locality(chip, priv->locality, 0);
- priv->flags |= TPM_TIS_ITPM_POSSIBLE;
+ priv->flags |= TPM_TIS_ITPM_WORKAROUND;
rc = tpm_tis_send_data(chip, cmd_getticks, len);
if (rc == 0)
dev_info(&chip->dev, "Detected an iTPM.\n");
else {
- priv->flags &= ~TPM_TIS_ITPM_POSSIBLE;
+ priv->flags &= ~TPM_TIS_ITPM_WORKAROUND;
rc = -EFAULT;
}
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index 9191aabbf9c2..e2212f021a02 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -80,7 +80,7 @@ enum tis_defaults {
#define TPM_RID(l) (0x0F04 | ((l) << 12))
enum tpm_tis_flags {
- TPM_TIS_ITPM_POSSIBLE = BIT(0),
+ TPM_TIS_ITPM_WORKAROUND = BIT(0),
};
struct tpm_tis_data {
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] tpm_tis: rename TPM_TIS_ITPM_POSSIBLE to TPM_TIS_ITPM_WORKAROUND
2017-01-12 22:04 [PATCH] tpm_tis: rename TPM_TIS_ITPM_POSSIBLE to TPM_TIS_ITPM_WORKAROUND Maciej S. Szmigiero
@ 2017-01-13 15:51 ` Jarkko Sakkinen
0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2017-01-13 15:51 UTC (permalink / raw)
To: Maciej S. Szmigiero
Cc: tpmdd-devel, linux-kernel, Peter Huewe, Marcel Selhorst,
Christophe Ricard, Jason Gunthorpe
On Thu, Jan 12, 2017 at 11:04:11PM +0100, Maciej S. Szmigiero wrote:
> Rename TPM_TIS_ITPM_POSSIBLE to TPM_TIS_ITPM_WORKAROUND since it gives a
> better idea what this flag actually does.
>
> Suggested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarkko
> ---
> This needs "tpm_tis: fix iTPM probe via probe_itpm() function"
> applied first.
>
> drivers/char/tpm/tpm_tis.c | 2 +-
> drivers/char/tpm/tpm_tis_core.c | 8 ++++----
> drivers/char/tpm/tpm_tis_core.h | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> index 0127af130cb1..7912dadc39be 100644
> --- a/drivers/char/tpm/tpm_tis.c
> +++ b/drivers/char/tpm/tpm_tis.c
> @@ -159,7 +159,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info,
> irq = tpm_info->irq;
>
> if (itpm)
> - phy->priv.flags |= TPM_TIS_ITPM_POSSIBLE;
> + phy->priv.flags |= TPM_TIS_ITPM_WORKAROUND;
>
> return tpm_tis_core_init(dev, &phy->priv, irq, &tpm_tcg,
> acpi_dev_handle);
> diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> index 401f1228547c..b6d2a6d474d2 100644
> --- a/drivers/char/tpm/tpm_tis_core.c
> +++ b/drivers/char/tpm/tpm_tis_core.c
> @@ -264,7 +264,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
> struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
> int rc, status, burstcnt;
> size_t count = 0;
> - bool itpm = priv->flags & TPM_TIS_ITPM_POSSIBLE;
> + bool itpm = priv->flags & TPM_TIS_ITPM_WORKAROUND;
>
> if (request_locality(chip, 0) < 0)
> return -EBUSY;
> @@ -467,7 +467,7 @@ static int probe_itpm(struct tpm_chip *chip)
> size_t len = sizeof(cmd_getticks);
> u16 vendor;
>
> - if (priv->flags & TPM_TIS_ITPM_POSSIBLE)
> + if (priv->flags & TPM_TIS_ITPM_WORKAROUND)
> return 0;
>
> rc = tpm_tis_read16(priv, TPM_DID_VID(0), &vendor);
> @@ -485,13 +485,13 @@ static int probe_itpm(struct tpm_chip *chip)
> tpm_tis_ready(chip);
> release_locality(chip, priv->locality, 0);
>
> - priv->flags |= TPM_TIS_ITPM_POSSIBLE;
> + priv->flags |= TPM_TIS_ITPM_WORKAROUND;
>
> rc = tpm_tis_send_data(chip, cmd_getticks, len);
> if (rc == 0)
> dev_info(&chip->dev, "Detected an iTPM.\n");
> else {
> - priv->flags &= ~TPM_TIS_ITPM_POSSIBLE;
> + priv->flags &= ~TPM_TIS_ITPM_WORKAROUND;
> rc = -EFAULT;
> }
>
> diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
> index 9191aabbf9c2..e2212f021a02 100644
> --- a/drivers/char/tpm/tpm_tis_core.h
> +++ b/drivers/char/tpm/tpm_tis_core.h
> @@ -80,7 +80,7 @@ enum tis_defaults {
> #define TPM_RID(l) (0x0F04 | ((l) << 12))
>
> enum tpm_tis_flags {
> - TPM_TIS_ITPM_POSSIBLE = BIT(0),
> + TPM_TIS_ITPM_WORKAROUND = BIT(0),
> };
>
> struct tpm_tis_data {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-13 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 22:04 [PATCH] tpm_tis: rename TPM_TIS_ITPM_POSSIBLE to TPM_TIS_ITPM_WORKAROUND Maciej S. Szmigiero
2017-01-13 15:51 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®