Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Usyskin and committed by
Greg Kroah-Hartman
27f476ea a816a00e

+32 -5
+2
drivers/misc/mei/debugfs.c
··· 172 172 dev->hbm_f_pg_supported); 173 173 pos += scnprintf(buf + pos, bufsz - pos, "\tDC: %01d\n", 174 174 dev->hbm_f_dc_supported); 175 + pos += scnprintf(buf + pos, bufsz - pos, "\tIE: %01d\n", 176 + dev->hbm_f_ie_supported); 175 177 pos += scnprintf(buf + pos, bufsz - pos, "\tDOT: %01d\n", 176 178 dev->hbm_f_dot_supported); 177 179 pos += scnprintf(buf + pos, bufsz - pos, "\tEV: %01d\n",
+7 -1
drivers/misc/mei/hbm.c
··· 301 301 enum_req = (struct hbm_host_enum_request *)dev->wr_msg.data; 302 302 memset(enum_req, 0, len); 303 303 enum_req->hbm_cmd = HOST_ENUM_REQ_CMD; 304 - enum_req->allow_add = dev->hbm_f_dc_supported; 304 + enum_req->flags |= dev->hbm_f_dc_supported ? 305 + MEI_HBM_ENUM_F_ALLOW_ADD : 0; 306 + enum_req->flags |= dev->hbm_f_ie_supported ? 307 + MEI_HBM_ENUM_F_IMMEDIATE_ENUM : 0; 305 308 306 309 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data); 307 310 if (ret) { ··· 980 977 981 978 if (dev->version.major_version >= HBM_MAJOR_VERSION_DC) 982 979 dev->hbm_f_dc_supported = 1; 980 + 981 + if (dev->version.major_version >= HBM_MAJOR_VERSION_IE) 982 + dev->hbm_f_ie_supported = 1; 983 983 984 984 /* disconnect on connect timeout instead of link reset */ 985 985 if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT)
+21 -4
drivers/misc/mei/hw.h
··· 53 53 #define HBM_MAJOR_VERSION_DC 2 54 54 55 55 /* 56 + * MEI version with immediate reply to enum request support 57 + */ 58 + #define HBM_MINOR_VERSION_IE 0 59 + #define HBM_MAJOR_VERSION_IE 2 60 + 61 + /* 56 62 * MEI version with disconnect on connection timeout support 57 63 */ 58 64 #define HBM_MINOR_VERSION_DOT 0 ··· 252 246 } __packed; 253 247 254 248 /** 255 - * struct hbm_host_enum_request - enumeration request from host to fw 249 + * enum hbm_host_enum_flags - enumeration request flags (HBM version >= 2.0) 256 250 * 257 - * @hbm_cmd: bus message command header 258 - * @allow_add: allow dynamic clients add HBM version >= 2.0 251 + * @MEI_HBM_ENUM_F_ALLOW_ADD: allow dynamic clients add 252 + * @MEI_HBM_ENUM_F_IMMEDIATE_ENUM: allow FW to send answer immediately 253 + */ 254 + enum hbm_host_enum_flags { 255 + MEI_HBM_ENUM_F_ALLOW_ADD = BIT(0), 256 + MEI_HBM_ENUM_F_IMMEDIATE_ENUM = BIT(1), 257 + }; 258 + 259 + /** 260 + * struct hbm_host_enum_request - enumeration request from host to fw 261 + * 262 + * @hbm_cmd : bus message command header 263 + * @flags : request flags 259 264 * @reserved: reserved 260 265 */ 261 266 struct hbm_host_enum_request { 262 267 u8 hbm_cmd; 263 - u8 allow_add; 268 + u8 flags; 264 269 u8 reserved[2]; 265 270 } __packed; 266 271
+2
drivers/misc/mei/mei_dev.h
··· 390 390 * @hbm_f_dot_supported : hbm feature disconnect on timeout 391 391 * @hbm_f_ev_supported : hbm feature event notification 392 392 * @hbm_f_fa_supported : hbm feature fixed address client 393 + * @hbm_f_ie_supported : hbm feature immediate reply to enum request 393 394 * 394 395 * @me_clients_rwsem: rw lock over me_clients list 395 396 * @me_clients : list of FW clients ··· 481 480 unsigned int hbm_f_dot_supported:1; 482 481 unsigned int hbm_f_ev_supported:1; 483 482 unsigned int hbm_f_fa_supported:1; 483 + unsigned int hbm_f_ie_supported:1; 484 484 485 485 struct rw_semaphore me_clients_rwsem; 486 486 struct list_head me_clients;