]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mei: enable async event notifications only from hbm version 2.0
authorTomas Winkler <tomas.winkler@intel.com>
Sun, 26 Jul 2015 06:54:17 +0000 (09:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Aug 2015 00:26:45 +0000 (17:26 -0700)
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>
drivers/misc/mei/debugfs.c
drivers/misc/mei/hbm.c
drivers/misc/mei/hw.h
drivers/misc/mei/mei_dev.h

index e39cfe6bc5bced955c93fafed00bfaf944b34b70..4b469cf9e60f8d77d07fe64f8cc958b19f2ff0e7 100644 (file)
@@ -158,6 +158,8 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
                                 dev->hbm_f_dc_supported);
                pos += scnprintf(buf + pos, bufsz - pos, "\tDOT: %01d\n",
                                 dev->hbm_f_dot_supported);
+               pos += scnprintf(buf + pos, bufsz - pos, "\tEV: %01d\n",
+                                dev->hbm_f_ev_supported);
        }
 
        pos += scnprintf(buf + pos, bufsz - pos, "pg:  %s, %s\n",
index 8a73fa06f3c4536b36b19b0dea2bc6ea2ad3e824..95e918c84a6c767d2a1fcc03388b23ff1370ddde 100644 (file)
@@ -903,6 +903,10 @@ static void mei_hbm_config_features(struct mei_device *dev)
        /* disconnect on connect timeout instead of link reset */
        if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT)
                dev->hbm_f_dot_supported = 1;
+
+       /* Notification Event Support */
+       if (dev->version.major_version >= HBM_MAJOR_VERSION_EV)
+               dev->hbm_f_ev_supported = 1;
 }
 
 /**
index a2c7aaba25d4f06d875e1d38f50bfeab8b0204bd..3f8901a503a6041f0218b445277fd81b905c4b24 100644 (file)
 #define HBM_MINOR_VERSION_DOT              0
 #define HBM_MAJOR_VERSION_DOT              2
 
+/*
+ * MEI version with notifcation support
+ */
+#define HBM_MINOR_VERSION_EV               0
+#define HBM_MAJOR_VERSION_EV               2
+
 /* Host bus message command opcode */
 #define MEI_HBM_CMD_OP_MSK                  0x7f
 /* Host bus message command RESPONSE */
index 362ebb15ccd9bfe9a59741761a12b147016cf870..e22bd21bb754600ec99dbf366d492eb9e7b29c6f 100644 (file)
@@ -419,6 +419,7 @@ const char *mei_pg_state_str(enum mei_pg_state state);
  * @hbm_f_pg_supported  : hbm feature pgi protocol
  * @hbm_f_dc_supported  : hbm feature dynamic clients
  * @hbm_f_dot_supported : hbm feature disconnect on timeout
+ * @hbm_f_ev_supported  : hbm feature event notification
  *
  * @me_clients_rwsem: rw lock over me_clients list
  * @me_clients  : list of FW clients
@@ -514,6 +515,7 @@ struct mei_device {
        unsigned int hbm_f_pg_supported:1;
        unsigned int hbm_f_dc_supported:1;
        unsigned int hbm_f_dot_supported:1;
+       unsigned int hbm_f_ev_supported:1;
 
        struct rw_semaphore me_clients_rwsem;
        struct list_head me_clients;