diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2018-07-31 02:35:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-02 04:18:30 -0400 |
commit | c2bd9fc13d0ca1926bfd8b8e6d88f93d84a51f2a (patch) | |
tree | 929555810f197c6c7b94d018ad28e84500579d05 /drivers/misc | |
parent | 9d89ddfc624649e200aeec57912635dbe259d07b (diff) |
mei: restrict dma ring support to hbm version 2.1
Only a firmware with version 2.1 and above supports dma ring feature.
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mei/debugfs.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/hbm.c | 6 | ||||
-rw-r--r-- | drivers/misc/mei/hw.h | 6 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c index c815da91089c..7b5df8fd6c5a 100644 --- a/drivers/misc/mei/debugfs.c +++ b/drivers/misc/mei/debugfs.c | |||
@@ -183,6 +183,8 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf, | |||
183 | dev->hbm_f_fa_supported); | 183 | dev->hbm_f_fa_supported); |
184 | pos += scnprintf(buf + pos, bufsz - pos, "\tOS: %01d\n", | 184 | pos += scnprintf(buf + pos, bufsz - pos, "\tOS: %01d\n", |
185 | dev->hbm_f_os_supported); | 185 | dev->hbm_f_os_supported); |
186 | pos += scnprintf(buf + pos, bufsz - pos, "\tDR: %01d\n", | ||
187 | dev->hbm_f_dr_supported); | ||
186 | } | 188 | } |
187 | 189 | ||
188 | pos += scnprintf(buf + pos, bufsz - pos, "pg: %s, %s\n", | 190 | 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 b0086c4aefe4..09e233d4c0de 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c | |||
@@ -1007,6 +1007,12 @@ static void mei_hbm_config_features(struct mei_device *dev) | |||
1007 | /* OS ver message Support */ | 1007 | /* OS ver message Support */ |
1008 | if (dev->version.major_version >= HBM_MAJOR_VERSION_OS) | 1008 | if (dev->version.major_version >= HBM_MAJOR_VERSION_OS) |
1009 | dev->hbm_f_os_supported = 1; | 1009 | dev->hbm_f_os_supported = 1; |
1010 | |||
1011 | /* DMA Ring Support */ | ||
1012 | if (dev->version.major_version > HBM_MAJOR_VERSION_DR || | ||
1013 | (dev->version.major_version == HBM_MAJOR_VERSION_DR && | ||
1014 | dev->version.minor_version >= HBM_MINOR_VERSION_DR)) | ||
1015 | dev->hbm_f_dr_supported = 1; | ||
1010 | } | 1016 | } |
1011 | 1017 | ||
1012 | /** | 1018 | /** |
diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h index 5fb8844a6db5..65655925791a 100644 --- a/drivers/misc/mei/hw.h +++ b/drivers/misc/mei/hw.h | |||
@@ -80,6 +80,12 @@ | |||
80 | #define HBM_MINOR_VERSION_OS 0 | 80 | #define HBM_MINOR_VERSION_OS 0 |
81 | #define HBM_MAJOR_VERSION_OS 2 | 81 | #define HBM_MAJOR_VERSION_OS 2 |
82 | 82 | ||
83 | /* | ||
84 | * MEI version with dma ring support | ||
85 | */ | ||
86 | #define HBM_MINOR_VERSION_DR 1 | ||
87 | #define HBM_MAJOR_VERSION_DR 2 | ||
88 | |||
83 | /* Host bus message command opcode */ | 89 | /* Host bus message command opcode */ |
84 | #define MEI_HBM_CMD_OP_MSK 0x7f | 90 | #define MEI_HBM_CMD_OP_MSK 0x7f |
85 | /* Host bus message command RESPONSE */ | 91 | /* Host bus message command RESPONSE */ |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 975afaa38a66..377397e1b5a5 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -418,6 +418,7 @@ struct mei_fw_version { | |||
418 | * @hbm_f_fa_supported : hbm feature fixed address client | 418 | * @hbm_f_fa_supported : hbm feature fixed address client |
419 | * @hbm_f_ie_supported : hbm feature immediate reply to enum request | 419 | * @hbm_f_ie_supported : hbm feature immediate reply to enum request |
420 | * @hbm_f_os_supported : hbm feature support OS ver message | 420 | * @hbm_f_os_supported : hbm feature support OS ver message |
421 | * @hbm_f_dr_supported : hbm feature dma ring supported | ||
421 | * | 422 | * |
422 | * @fw_ver : FW versions | 423 | * @fw_ver : FW versions |
423 | * | 424 | * |
@@ -495,6 +496,7 @@ struct mei_device { | |||
495 | unsigned int hbm_f_fa_supported:1; | 496 | unsigned int hbm_f_fa_supported:1; |
496 | unsigned int hbm_f_ie_supported:1; | 497 | unsigned int hbm_f_ie_supported:1; |
497 | unsigned int hbm_f_os_supported:1; | 498 | unsigned int hbm_f_os_supported:1; |
499 | unsigned int hbm_f_dr_supported:1; | ||
498 | 500 | ||
499 | struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS]; | 501 | struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS]; |
500 | 502 | ||