diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-04-18 22:03:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 19:58:21 +0200 |
commit | 9b0d5efc421ac79d9a6d97c681eff93288093784 (patch) | |
tree | fcde453f66d5eb63dcea84ba9e04f9381ecd1e08 /drivers/misc/mei/hbm.h | |
parent | Revert "drivers/scsi: use module_pcmcia_driver() in pcmcia drivers" (diff) | |
download | linux-9b0d5efc421ac79d9a6d97c681eff93288093784.tar.xz linux-9b0d5efc421ac79d9a6d97c681eff93288093784.zip |
mei: revamp hbm state machine
1. Rename init_clients_state to hbm_state and use
MEI_HBM_ prefix for HBM states
2. Remove recvd_msg and use hbm state for synchronizing
hbm protocol has successful start.
We can wake up the hbm event from start response handler
and remove the hack from the interrupt thread
3. mei_hbm_start_wait function encapsulate start completion
waiting
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/hbm.h')
-rw-r--r-- | drivers/misc/mei/hbm.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/misc/mei/hbm.h b/drivers/misc/mei/hbm.h index b552afbaf85c..e80dc24ef3e2 100644 --- a/drivers/misc/mei/hbm.h +++ b/drivers/misc/mei/hbm.h @@ -17,6 +17,27 @@ #ifndef _MEI_HBM_H_ #define _MEI_HBM_H_ +struct mei_device; +struct mei_msg_hdr; +struct mei_cl; + +/** + * enum mei_hbm_state - host bus message protocol state + * + * @MEI_HBM_IDLE : protocol not started + * @MEI_HBM_START : start request message was sent + * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent + * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties + */ +enum mei_hbm_state { + MEI_HBM_IDLE = 0, + MEI_HBM_START, + MEI_HBM_ENUM_CLIENTS, + MEI_HBM_CLIENT_PROPERTIES, + MEI_HBM_STARTED, + MEI_HBM_STOP, +}; + void mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr); static inline void mei_hbm_hdr(struct mei_msg_hdr *hdr, size_t length) @@ -28,8 +49,8 @@ static inline void mei_hbm_hdr(struct mei_msg_hdr *hdr, size_t length) hdr->reserved = 0; } -void mei_hbm_start_req(struct mei_device *dev); - +int mei_hbm_start_req(struct mei_device *dev); +int mei_hbm_start_wait(struct mei_device *dev); int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl); int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl); int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl); |