From: Tomas Winkler <tomas.winkler@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
linux-kernel@vger.kernel.org,
Tomas Winkler <tomas.winkler@intel.com>,
Chen Yu <yu.c.chen@intel.com>, Jan Niehusmann <jan@gondor.com>,
"Sarvela, Tomi P" <tomi.p.sarvela@intel.com>
Subject: [char-misc for 4.10-rc4 V2] mei: bus: enable OS version only for SPT and newer
Date: Wed, 11 Jan 2017 01:27:21 +0200 [thread overview]
Message-ID: <1484090841-16483-1-git-send-email-tomas.winkler@intel.com> (raw)
From: Alexander Usyskin <alexander.usyskin@intel.com>
Sending OS version for support of TPM2_ChangeEPS() is required only
for SPT FW (HMB version 2.0) and newer.
On older platforms the command should be just ignored by the firmware
but some older platforms misbehave so it's safer to send the command
only if required.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=192051
Fixes: 7279b238bade (mei: send OS type to the FW)
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
V2: use correct sha1 of the original buggy patch
drivers/misc/mei/bus-fixup.c | 3 +++
drivers/misc/mei/debugfs.c | 2 ++
drivers/misc/mei/hbm.c | 4 ++++
drivers/misc/mei/hw.h | 6 ++++++
drivers/misc/mei/mei_dev.h | 2 ++
5 files changed, 17 insertions(+)
diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c
index 18e05ca7584f..3600c9993a98 100644
--- a/drivers/misc/mei/bus-fixup.c
+++ b/drivers/misc/mei/bus-fixup.c
@@ -152,6 +152,9 @@ static void mei_mkhi_fix(struct mei_cl_device *cldev)
{
int ret;
+ if (!cldev->bus->hbm_f_os_supported)
+ return;
+
ret = mei_cldev_enable(cldev);
if (ret)
return;
diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c
index c6c051b52f55..c6217a4993ad 100644
--- a/drivers/misc/mei/debugfs.c
+++ b/drivers/misc/mei/debugfs.c
@@ -180,6 +180,8 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
dev->hbm_f_ev_supported);
pos += scnprintf(buf + pos, bufsz - pos, "\tFA: %01d\n",
dev->hbm_f_fa_supported);
+ pos += scnprintf(buf + pos, bufsz - pos, "\tOS: %01d\n",
+ dev->hbm_f_os_supported);
}
pos += scnprintf(buf + pos, bufsz - pos, "pg: %s, %s\n",
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index dd7f15a65eed..25b4a1ba522d 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -989,6 +989,10 @@ static void mei_hbm_config_features(struct mei_device *dev)
/* Fixed Address Client Support */
if (dev->version.major_version >= HBM_MAJOR_VERSION_FA)
dev->hbm_f_fa_supported = 1;
+
+ /* OS ver message Support */
+ if (dev->version.major_version >= HBM_MAJOR_VERSION_OS)
+ dev->hbm_f_os_supported = 1;
}
/**
diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h
index 9daf3f9aed25..e1e4d47d4d7d 100644
--- a/drivers/misc/mei/hw.h
+++ b/drivers/misc/mei/hw.h
@@ -76,6 +76,12 @@
#define HBM_MINOR_VERSION_FA 0
#define HBM_MAJOR_VERSION_FA 2
+/*
+ * MEI version with OS ver message support
+ */
+#define HBM_MINOR_VERSION_OS 0
+#define HBM_MAJOR_VERSION_OS 2
+
/* Host bus message command opcode */
#define MEI_HBM_CMD_OP_MSK 0x7f
/* Host bus message command RESPONSE */
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 699693cd8c59..8dadb98662a9 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -406,6 +406,7 @@ const char *mei_pg_state_str(enum mei_pg_state state);
* @hbm_f_ev_supported : hbm feature event notification
* @hbm_f_fa_supported : hbm feature fixed address client
* @hbm_f_ie_supported : hbm feature immediate reply to enum request
+ * @hbm_f_os_supported : hbm feature support OS ver message
*
* @me_clients_rwsem: rw lock over me_clients list
* @me_clients : list of FW clients
@@ -487,6 +488,7 @@ struct mei_device {
unsigned int hbm_f_ev_supported:1;
unsigned int hbm_f_fa_supported:1;
unsigned int hbm_f_ie_supported:1;
+ unsigned int hbm_f_os_supported:1;
struct rw_semaphore me_clients_rwsem;
struct list_head me_clients;
--
2.7.4
next reply other threads:[~2017-01-10 22:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-10 23:27 Tomas Winkler [this message]
2017-01-10 22:49 ` Jan Niehusmann
2017-01-11 9:24 ` Winkler, Tomas
2017-01-11 10:20 ` Paul Menzel
2017-01-11 10:57 ` Winkler, Tomas
2017-01-11 14:12 ` Winkler, Tomas
2017-01-11 14:26 ` Paul Menzel
2017-01-11 16:10 ` Winkler, Tomas
2017-01-13 13:00 ` Greg Kroah-Hartman
2017-01-14 19:27 ` Paul Menzel
2017-01-14 19:39 ` Greg Kroah-Hartman
2017-01-15 7:19 ` Winkler, Tomas
2017-01-15 10:58 ` Greg Kroah-Hartman
2017-01-16 11:05 ` Greg Kroah-Hartman
2017-01-17 8:14 ` Thorsten Leemhuis
2017-01-17 14:34 ` Regression on Dell XPS13 (was: [char-misc for 4.10-rc4 V2] mei: bus: enable OS version only for SPT and newer) Paul Menzel
2017-01-17 16:57 ` Mario.Limonciello
2017-01-17 18:23 ` Greg KH
2017-01-17 18:38 ` Mario.Limonciello
2017-01-17 23:33 ` Darren Hart
2017-01-20 23:11 ` Mario.Limonciello
2017-01-21 9:11 ` Greg KH
2017-01-21 11:49 ` Rafael J. Wysocki
2017-01-22 11:25 ` Greg KH
2017-01-24 20:24 ` Mario.Limonciello
2017-01-22 9:45 ` Rafael J. Wysocki
2017-01-24 20:14 ` Mario.Limonciello
2017-01-18 2:18 ` Rafael J. Wysocki
2017-01-18 11:11 ` Regression on Dell XPS13 Paul Menzel
2017-01-18 11:30 ` Rafael J. Wysocki
2017-01-17 17:29 ` Thorsten Leemhuis
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=1484090841-16483-1-git-send-email-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jan@gondor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tomi.p.sarvela@intel.com \
--cc=yu.c.chen@intel.com \
/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 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®