mei: wd and amthif use mei_cl_ api for dis/connection
Connect wd and amthif through regular mei_cl_connect API as there is no reason to connect in asynchronous mode. Also use mei_cl_is_connected in order to protect flows instead of depending on wd_pending and amthif_timer Now we can remove all the special handling in hbm layer Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
285e299665
commit
64092858ac
@@ -487,7 +487,7 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list)
|
||||
wake_up_interruptible(&dev->wait_stop_wd);
|
||||
}
|
||||
|
||||
if (dev->dev_state == MEI_DEV_ENABLED) {
|
||||
if (mei_cl_is_connected(&dev->wd_cl)) {
|
||||
if (dev->wd_pending &&
|
||||
mei_cl_flow_ctrl_creds(&dev->wd_cl) > 0) {
|
||||
if (mei_wd_send(dev))
|
||||
@@ -613,6 +613,9 @@ void mei_timer(struct work_struct *work)
|
||||
}
|
||||
}
|
||||
|
||||
if (!mei_cl_is_connected(&dev->iamthif_cl))
|
||||
goto out;
|
||||
|
||||
if (dev->iamthif_stall_timer) {
|
||||
if (--dev->iamthif_stall_timer == 0) {
|
||||
dev_err(&dev->pdev->dev, "timer: amthif hanged.\n");
|
||||
|
Reference in New Issue
Block a user