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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
9d89ddfc62
commit
c2bd9fc13d
@@ -183,6 +183,8 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
|
|||||||
dev->hbm_f_fa_supported);
|
dev->hbm_f_fa_supported);
|
||||||
pos += scnprintf(buf + pos, bufsz - pos, "\tOS: %01d\n",
|
pos += scnprintf(buf + pos, bufsz - pos, "\tOS: %01d\n",
|
||||||
dev->hbm_f_os_supported);
|
dev->hbm_f_os_supported);
|
||||||
|
pos += scnprintf(buf + pos, bufsz - pos, "\tDR: %01d\n",
|
||||||
|
dev->hbm_f_dr_supported);
|
||||||
}
|
}
|
||||||
|
|
||||||
pos += scnprintf(buf + pos, bufsz - pos, "pg: %s, %s\n",
|
pos += scnprintf(buf + pos, bufsz - pos, "pg: %s, %s\n",
|
||||||
|
@@ -1007,6 +1007,12 @@ static void mei_hbm_config_features(struct mei_device *dev)
|
|||||||
/* OS ver message Support */
|
/* OS ver message Support */
|
||||||
if (dev->version.major_version >= HBM_MAJOR_VERSION_OS)
|
if (dev->version.major_version >= HBM_MAJOR_VERSION_OS)
|
||||||
dev->hbm_f_os_supported = 1;
|
dev->hbm_f_os_supported = 1;
|
||||||
|
|
||||||
|
/* DMA Ring Support */
|
||||||
|
if (dev->version.major_version > HBM_MAJOR_VERSION_DR ||
|
||||||
|
(dev->version.major_version == HBM_MAJOR_VERSION_DR &&
|
||||||
|
dev->version.minor_version >= HBM_MINOR_VERSION_DR))
|
||||||
|
dev->hbm_f_dr_supported = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -80,6 +80,12 @@
|
|||||||
#define HBM_MINOR_VERSION_OS 0
|
#define HBM_MINOR_VERSION_OS 0
|
||||||
#define HBM_MAJOR_VERSION_OS 2
|
#define HBM_MAJOR_VERSION_OS 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MEI version with dma ring support
|
||||||
|
*/
|
||||||
|
#define HBM_MINOR_VERSION_DR 1
|
||||||
|
#define HBM_MAJOR_VERSION_DR 2
|
||||||
|
|
||||||
/* Host bus message command opcode */
|
/* Host bus message command opcode */
|
||||||
#define MEI_HBM_CMD_OP_MSK 0x7f
|
#define MEI_HBM_CMD_OP_MSK 0x7f
|
||||||
/* Host bus message command RESPONSE */
|
/* Host bus message command RESPONSE */
|
||||||
|
@@ -418,6 +418,7 @@ struct mei_fw_version {
|
|||||||
* @hbm_f_fa_supported : hbm feature fixed address client
|
* @hbm_f_fa_supported : hbm feature fixed address client
|
||||||
* @hbm_f_ie_supported : hbm feature immediate reply to enum request
|
* @hbm_f_ie_supported : hbm feature immediate reply to enum request
|
||||||
* @hbm_f_os_supported : hbm feature support OS ver message
|
* @hbm_f_os_supported : hbm feature support OS ver message
|
||||||
|
* @hbm_f_dr_supported : hbm feature dma ring supported
|
||||||
*
|
*
|
||||||
* @fw_ver : FW versions
|
* @fw_ver : FW versions
|
||||||
*
|
*
|
||||||
@@ -495,6 +496,7 @@ struct mei_device {
|
|||||||
unsigned int hbm_f_fa_supported:1;
|
unsigned int hbm_f_fa_supported:1;
|
||||||
unsigned int hbm_f_ie_supported:1;
|
unsigned int hbm_f_ie_supported:1;
|
||||||
unsigned int hbm_f_os_supported:1;
|
unsigned int hbm_f_os_supported:1;
|
||||||
|
unsigned int hbm_f_dr_supported:1;
|
||||||
|
|
||||||
struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS];
|
struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user