mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 18:21:49 +00:00
mei: hbm: send immediate reply flag in enum request
Signal the FW that it can send an HBM enumeration answer immediately, without waiting for FW initialization completion, meaning before all the FW clients are ready and registered. Organize enumeration response options to enum as a byproduct. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a816a00ece
commit
27f476ea98
@ -172,6 +172,8 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
|
||||
dev->hbm_f_pg_supported);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "\tDC: %01d\n",
|
||||
dev->hbm_f_dc_supported);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "\tIE: %01d\n",
|
||||
dev->hbm_f_ie_supported);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "\tDOT: %01d\n",
|
||||
dev->hbm_f_dot_supported);
|
||||
pos += scnprintf(buf + pos, bufsz - pos, "\tEV: %01d\n",
|
||||
|
@ -301,7 +301,10 @@ static int mei_hbm_enum_clients_req(struct mei_device *dev)
|
||||
enum_req = (struct hbm_host_enum_request *)dev->wr_msg.data;
|
||||
memset(enum_req, 0, len);
|
||||
enum_req->hbm_cmd = HOST_ENUM_REQ_CMD;
|
||||
enum_req->allow_add = dev->hbm_f_dc_supported;
|
||||
enum_req->flags |= dev->hbm_f_dc_supported ?
|
||||
MEI_HBM_ENUM_F_ALLOW_ADD : 0;
|
||||
enum_req->flags |= dev->hbm_f_ie_supported ?
|
||||
MEI_HBM_ENUM_F_IMMEDIATE_ENUM : 0;
|
||||
|
||||
ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
|
||||
if (ret) {
|
||||
@ -978,6 +981,9 @@ static void mei_hbm_config_features(struct mei_device *dev)
|
||||
if (dev->version.major_version >= HBM_MAJOR_VERSION_DC)
|
||||
dev->hbm_f_dc_supported = 1;
|
||||
|
||||
if (dev->version.major_version >= HBM_MAJOR_VERSION_IE)
|
||||
dev->hbm_f_ie_supported = 1;
|
||||
|
||||
/* disconnect on connect timeout instead of link reset */
|
||||
if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT)
|
||||
dev->hbm_f_dot_supported = 1;
|
||||
|
@ -52,6 +52,12 @@
|
||||
#define HBM_MINOR_VERSION_DC 0
|
||||
#define HBM_MAJOR_VERSION_DC 2
|
||||
|
||||
/*
|
||||
* MEI version with immediate reply to enum request support
|
||||
*/
|
||||
#define HBM_MINOR_VERSION_IE 0
|
||||
#define HBM_MAJOR_VERSION_IE 2
|
||||
|
||||
/*
|
||||
* MEI version with disconnect on connection timeout support
|
||||
*/
|
||||
@ -246,15 +252,26 @@ struct hbm_me_stop_request {
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct hbm_host_enum_request - enumeration request from host to fw
|
||||
* enum hbm_host_enum_flags - enumeration request flags (HBM version >= 2.0)
|
||||
*
|
||||
* @hbm_cmd: bus message command header
|
||||
* @allow_add: allow dynamic clients add HBM version >= 2.0
|
||||
* @MEI_HBM_ENUM_F_ALLOW_ADD: allow dynamic clients add
|
||||
* @MEI_HBM_ENUM_F_IMMEDIATE_ENUM: allow FW to send answer immediately
|
||||
*/
|
||||
enum hbm_host_enum_flags {
|
||||
MEI_HBM_ENUM_F_ALLOW_ADD = BIT(0),
|
||||
MEI_HBM_ENUM_F_IMMEDIATE_ENUM = BIT(1),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hbm_host_enum_request - enumeration request from host to fw
|
||||
*
|
||||
* @hbm_cmd : bus message command header
|
||||
* @flags : request flags
|
||||
* @reserved: reserved
|
||||
*/
|
||||
struct hbm_host_enum_request {
|
||||
u8 hbm_cmd;
|
||||
u8 allow_add;
|
||||
u8 flags;
|
||||
u8 reserved[2];
|
||||
} __packed;
|
||||
|
||||
|
@ -390,6 +390,7 @@ const char *mei_pg_state_str(enum mei_pg_state state);
|
||||
* @hbm_f_dot_supported : hbm feature disconnect on timeout
|
||||
* @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
|
||||
*
|
||||
* @me_clients_rwsem: rw lock over me_clients list
|
||||
* @me_clients : list of FW clients
|
||||
@ -480,6 +481,7 @@ struct mei_device {
|
||||
unsigned int hbm_f_dot_supported:1;
|
||||
unsigned int hbm_f_ev_supported:1;
|
||||
unsigned int hbm_f_fa_supported:1;
|
||||
unsigned int hbm_f_ie_supported:1;
|
||||
|
||||
struct rw_semaphore me_clients_rwsem;
|
||||
struct list_head me_clients;
|
||||
|
Loading…
Reference in New Issue
Block a user