Commit bd47b526 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman

mei: introduce host client uninitialized state

Introduce a new host client state, MEI_FILE_UNINITIALIZED,
to distinguish client objects that was unlinked,
but not destroyed and can be linked again.
Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96bc8183
...@@ -571,7 +571,7 @@ void mei_cl_init(struct mei_cl *cl, struct mei_device *dev) ...@@ -571,7 +571,7 @@ void mei_cl_init(struct mei_cl *cl, struct mei_device *dev)
INIT_LIST_HEAD(&cl->rd_pending); INIT_LIST_HEAD(&cl->rd_pending);
INIT_LIST_HEAD(&cl->link); INIT_LIST_HEAD(&cl->link);
cl->writing_state = MEI_IDLE; cl->writing_state = MEI_IDLE;
cl->state = MEI_FILE_INITIALIZING; cl->state = MEI_FILE_UNINITIALIZED;
cl->dev = dev; cl->dev = dev;
} }
...@@ -672,7 +672,7 @@ int mei_cl_unlink(struct mei_cl *cl) ...@@ -672,7 +672,7 @@ int mei_cl_unlink(struct mei_cl *cl)
list_del_init(&cl->link); list_del_init(&cl->link);
cl->state = MEI_FILE_INITIALIZING; cl->state = MEI_FILE_UNINITIALIZED;
return 0; return 0;
} }
...@@ -756,7 +756,7 @@ void mei_cl_set_disconnected(struct mei_cl *cl) ...@@ -756,7 +756,7 @@ void mei_cl_set_disconnected(struct mei_cl *cl)
struct mei_device *dev = cl->dev; struct mei_device *dev = cl->dev;
if (cl->state == MEI_FILE_DISCONNECTED || if (cl->state == MEI_FILE_DISCONNECTED ||
cl->state == MEI_FILE_INITIALIZING) cl->state <= MEI_FILE_INITIALIZING)
return; return;
cl->state = MEI_FILE_DISCONNECTED; cl->state = MEI_FILE_DISCONNECTED;
......
...@@ -55,7 +55,8 @@ extern const uuid_le mei_amthif_guid; ...@@ -55,7 +55,8 @@ extern const uuid_le mei_amthif_guid;
/* File state */ /* File state */
enum file_state { enum file_state {
MEI_FILE_INITIALIZING = 0, MEI_FILE_UNINITIALIZED = 0,
MEI_FILE_INITIALIZING,
MEI_FILE_CONNECTING, MEI_FILE_CONNECTING,
MEI_FILE_CONNECTED, MEI_FILE_CONNECTED,
MEI_FILE_DISCONNECTING, MEI_FILE_DISCONNECTING,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment