mei: support for dynamic clients

HBM version 2.0 and above allows ME clients in the system to
register/unregister after the system is fully initialized.
Clients may be added or removed after enum_resp message was
received

1. To preserve backward compatibility the driver can opt-in to receive
client add messages by setting allow_add field in enum_req

2. A new client is added upon reception of MEI_HBM_ADD_CLIENT_REQ_CMD

3. A client is removed in a lazy manner when connection request
respond with MEI_HBMS_CLIENT_NOT_FOUND status

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tomas Winkler
2015-07-23 21:37:12 +03:00
committed by Greg Kroah-Hartman
parent 6009595a66
commit 70ef835c84
4 changed files with 144 additions and 2 deletions

View File

@@ -408,6 +408,7 @@ const char *mei_pg_state_str(enum mei_pg_state state);
*
* @version : HBM protocol version in use
* @hbm_f_pg_supported : hbm feature pgi protocol
* @hbm_f_dc_supported : hbm feature dynamic clients
*
* @me_clients_rwsem: rw lock over me_clients list
* @me_clients : list of FW clients
@@ -501,6 +502,7 @@ struct mei_device {
struct hbm_version version;
unsigned int hbm_f_pg_supported:1;
unsigned int hbm_f_dc_supported:1;
struct rw_semaphore me_clients_rwsem;
struct list_head me_clients;