bitmap_set(dev->host_clients_map, 0, 3);
dev->mei_state = MEI_ENABLED;
- mei_wd_host_init(dev);
+ /* if wd initialization fails, initialization the AMTHI client,
+ * otherwise the AMTHI client will be initialized after the WD client connect response
+ * will be received
+ */
+ if (mei_wd_host_init(dev))
+ mei_host_init_iamthif(dev);
+
return;
}
int mei_wd_send(struct mei_device *dev);
int mei_wd_stop(struct mei_device *dev, bool preserve);
-void mei_wd_host_init(struct mei_device *dev);
+bool mei_wd_host_init(struct mei_device *dev);
void mei_wd_start_setup(struct mei_device *dev);
int mei_flow_ctrl_reduce(struct mei_device *dev, struct mei_cl *cl);
*
* @dev: the device structure
*/
-void mei_wd_host_init(struct mei_device *dev)
+bool mei_wd_host_init(struct mei_device *dev)
{
+ bool ret = false;
+
mei_cl_init(&dev->wd_cl, dev);
/* look for WD client and connect to it */
dev_dbg(&dev->pdev->dev, "Failed to connect to WD client\n");
dev->wd_cl.state = MEI_FILE_DISCONNECTED;
dev->wd_cl.host_client_id = 0;
- mei_host_init_iamthif(dev) ;
+ ret = false;
+ goto end;
} else {
dev->wd_cl.timer_count = CONNECT_TIMEOUT;
}
} else {
dev_dbg(&dev->pdev->dev, "Failed to find WD client\n");
- mei_host_init_iamthif(dev) ;
+ ret = false;
+ goto end;
}
} else {
dev->wd_bypass = true;
dev_dbg(&dev->pdev->dev, "WD requested to be disabled\n");
- mei_host_init_iamthif(dev) ;
+ ret = false;
+ goto end;
}
+
+end:
+ return ret;
}
/**