aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-07-26 02:54:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 20:26:45 -0400
commit4d99877d871da0bbb924b2d7aa4ccb27e1ffa93a (patch)
tree7bb725573f21ede0e5844d0be5103bdc46374e5c
parent965ae37ab86eb8cd327c5752dc9e2190d33db25c (diff)
mei: enable async event notifications only from hbm version 2.0
Only FW version 2.0 and newer support the async event notification. For backward compatibility block the feature if the FW version is older then 2.0 Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/mei/debugfs.c2
-rw-r--r--drivers/misc/mei/hbm.c4
-rw-r--r--drivers/misc/mei/hw.h6
-rw-r--r--drivers/misc/mei/mei_dev.h2
4 files changed, 14 insertions, 0 deletions
diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c
index e39cfe6bc5bc..4b469cf9e60f 100644
--- a/drivers/misc/mei/debugfs.c
+++ b/drivers/misc/mei/debugfs.c
@@ -158,6 +158,8 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
158 dev->hbm_f_dc_supported); 158 dev->hbm_f_dc_supported);
159 pos += scnprintf(buf + pos, bufsz - pos, "\tDOT: %01d\n", 159 pos += scnprintf(buf + pos, bufsz - pos, "\tDOT: %01d\n",
160 dev->hbm_f_dot_supported); 160 dev->hbm_f_dot_supported);
161 pos += scnprintf(buf + pos, bufsz - pos, "\tEV: %01d\n",
162 dev->hbm_f_ev_supported);
161 } 163 }
162 164
163 pos += scnprintf(buf + pos, bufsz - pos, "pg: %s, %s\n", 165 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 8a73fa06f3c4..95e918c84a6c 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -903,6 +903,10 @@ static void mei_hbm_config_features(struct mei_device *dev)
903 /* disconnect on connect timeout instead of link reset */ 903 /* disconnect on connect timeout instead of link reset */
904 if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT) 904 if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT)
905 dev->hbm_f_dot_supported = 1; 905 dev->hbm_f_dot_supported = 1;
906
907 /* Notification Event Support */
908 if (dev->version.major_version >= HBM_MAJOR_VERSION_EV)
909 dev->hbm_f_ev_supported = 1;
906} 910}
907 911
908/** 912/**
diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h
index a2c7aaba25d4..3f8901a503a6 100644
--- a/drivers/misc/mei/hw.h
+++ b/drivers/misc/mei/hw.h
@@ -58,6 +58,12 @@
58#define HBM_MINOR_VERSION_DOT 0 58#define HBM_MINOR_VERSION_DOT 0
59#define HBM_MAJOR_VERSION_DOT 2 59#define HBM_MAJOR_VERSION_DOT 2
60 60
61/*
62 * MEI version with notifcation support
63 */
64#define HBM_MINOR_VERSION_EV 0
65#define HBM_MAJOR_VERSION_EV 2
66
61/* Host bus message command opcode */ 67/* Host bus message command opcode */
62#define MEI_HBM_CMD_OP_MSK 0x7f 68#define MEI_HBM_CMD_OP_MSK 0x7f
63/* Host bus message command RESPONSE */ 69/* Host bus message command RESPONSE */
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 362ebb15ccd9..e22bd21bb754 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -419,6 +419,7 @@ const char *mei_pg_state_str(enum mei_pg_state state);
419 * @hbm_f_pg_supported : hbm feature pgi protocol 419 * @hbm_f_pg_supported : hbm feature pgi protocol
420 * @hbm_f_dc_supported : hbm feature dynamic clients 420 * @hbm_f_dc_supported : hbm feature dynamic clients
421 * @hbm_f_dot_supported : hbm feature disconnect on timeout 421 * @hbm_f_dot_supported : hbm feature disconnect on timeout
422 * @hbm_f_ev_supported : hbm feature event notification
422 * 423 *
423 * @me_clients_rwsem: rw lock over me_clients list 424 * @me_clients_rwsem: rw lock over me_clients list
424 * @me_clients : list of FW clients 425 * @me_clients : list of FW clients
@@ -514,6 +515,7 @@ struct mei_device {
514 unsigned int hbm_f_pg_supported:1; 515 unsigned int hbm_f_pg_supported:1;
515 unsigned int hbm_f_dc_supported:1; 516 unsigned int hbm_f_dc_supported:1;
516 unsigned int hbm_f_dot_supported:1; 517 unsigned int hbm_f_dot_supported:1;
518 unsigned int hbm_f_ev_supported:1;
517 519
518 struct rw_semaphore me_clients_rwsem; 520 struct rw_semaphore me_clients_rwsem;
519 struct list_head me_clients; 521 struct list_head me_clients;