Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-02-20 11:36:45 +0100
committerJiri Slaby <jslaby@suse.cz>2011-02-20 11:37:13 +0100
commitd991856c504fde6a982723fd4be108abb975754a (patch)
tree497903fcfdef7c13c03c8b575f7654b473cdbd9a
parentda9d3a81ff33970a50cef64e86855f379eac6628 (diff)
- Revert "tpm_tis: Use timeouts returned from TPM" (bnc#673619).
-rw-r--r--patches.fixes/revert-tpm_tis-Use-timeouts-returned-from-TPM.patch93
-rw-r--r--series.conf1
2 files changed, 94 insertions, 0 deletions
diff --git a/patches.fixes/revert-tpm_tis-Use-timeouts-returned-from-TPM.patch b/patches.fixes/revert-tpm_tis-Use-timeouts-returned-from-TPM.patch
new file mode 100644
index 0000000000..552fac0056
--- /dev/null
+++ b/patches.fixes/revert-tpm_tis-Use-timeouts-returned-from-TPM.patch
@@ -0,0 +1,93 @@
+From 8e19b87782d08de1c384f40846e10294c4d04a3f Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Sun, 20 Feb 2011 11:06:35 +0100
+Subject: Revert "tpm_tis: Use timeouts returned from TPM"
+References: bnc#673619
+Patch-mainline: no (probably a fix instead of revert will be)
+
+This reverts commit 44489516c52b3b76d9b2a0e670a26b6e64938ddf.
+
+It breaks hibernation.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/char/tpm/tpm.c | 18 ++----------------
+ drivers/char/tpm/tpm.h | 2 --
+ drivers/char/tpm/tpm_tis.c | 4 +---
+ 3 files changed, 3 insertions(+), 21 deletions(-)
+
+diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
+index 55d0466..d5284bc 100644
+--- a/drivers/char/tpm/tpm.c
++++ b/drivers/char/tpm/tpm.c
+@@ -577,11 +577,9 @@ duration:
+ if (rc)
+ return;
+
+- if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 ||
+- be32_to_cpu(tpm_cmd.header.out.length)
+- != sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32))
++ if (be32_to_cpu(tpm_cmd.header.out.return_code)
++ != 3 * sizeof(u32))
+ return;
+-
+ duration_cap = &tpm_cmd.params.getcap_out.cap.duration;
+ chip->vendor.duration[TPM_SHORT] =
+ usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short));
+@@ -925,18 +923,6 @@ ssize_t tpm_show_caps_1_2(struct device * dev,
+ }
+ EXPORT_SYMBOL_GPL(tpm_show_caps_1_2);
+
+-ssize_t tpm_show_timeouts(struct device *dev, struct device_attribute *attr,
+- char *buf)
+-{
+- struct tpm_chip *chip = dev_get_drvdata(dev);
+-
+- return sprintf(buf, "%d %d %d\n",
+- jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]),
+- jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]),
+- jiffies_to_usecs(chip->vendor.duration[TPM_LONG]));
+-}
+-EXPORT_SYMBOL_GPL(tpm_show_timeouts);
+-
+ ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+ {
+diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
+index ba1779c..792868d 100644
+--- a/drivers/char/tpm/tpm.h
++++ b/drivers/char/tpm/tpm.h
+@@ -56,8 +56,6 @@ extern ssize_t tpm_show_owned(struct device *, struct device_attribute *attr,
+ char *);
+ extern ssize_t tpm_show_temp_deactivated(struct device *,
+ struct device_attribute *attr, char *);
+-extern ssize_t tpm_show_timeouts(struct device *,
+- struct device_attribute *attr, char *);
+
+ struct tpm_chip;
+
+diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
+index 0d1d38e..dd21df5 100644
+--- a/drivers/char/tpm/tpm_tis.c
++++ b/drivers/char/tpm/tpm_tis.c
+@@ -376,7 +376,6 @@ static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated,
+ NULL);
+ static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps_1_2, NULL);
+ static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel);
+-static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL);
+
+ static struct attribute *tis_attrs[] = {
+ &dev_attr_pubek.attr,
+@@ -386,8 +385,7 @@ static struct attribute *tis_attrs[] = {
+ &dev_attr_owned.attr,
+ &dev_attr_temp_deactivated.attr,
+ &dev_attr_caps.attr,
+- &dev_attr_cancel.attr,
+- &dev_attr_timeouts.attr, NULL,
++ &dev_attr_cancel.attr, NULL,
+ };
+
+ static struct attribute_group tis_attr_grp = {
+--
+1.7.3.2
+
diff --git a/series.conf b/series.conf
index 3412f1ec7a..d0bd9dcdb3 100644
--- a/series.conf
+++ b/series.conf
@@ -465,6 +465,7 @@
########################################################
patches.drivers/disable-catas_reset-by-default-to-avoid-problems-with-eeh.patch
+ patches.fixes/revert-tpm_tis-Use-timeouts-returned-from-TPM.patch
########################################################
# Storage