mei: disconnect on connection request timeout
For the FW with HBM version >= 2.0 we don't need to reset the whole device in case of a particular client failing to connect, it is enough to send disconnect a request to bring the device to the stable state. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
70ef835c84
commit
18901357e7
@@ -424,6 +424,24 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list)
|
||||
EXPORT_SYMBOL_GPL(mei_irq_write_handler);
|
||||
|
||||
|
||||
/**
|
||||
* mei_connect_timeout - connect/disconnect timeouts
|
||||
*
|
||||
* @cl: host client
|
||||
*/
|
||||
static void mei_connect_timeout(struct mei_cl *cl)
|
||||
{
|
||||
struct mei_device *dev = cl->dev;
|
||||
|
||||
if (cl->state == MEI_FILE_CONNECTING) {
|
||||
if (dev->hbm_f_dot_supported) {
|
||||
cl->state = MEI_FILE_DISCONNECT_REQUIRED;
|
||||
wake_up(&cl->wait);
|
||||
return;
|
||||
}
|
||||
}
|
||||
mei_reset(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* mei_timer - timer function.
|
||||
@@ -464,7 +482,7 @@ void mei_timer(struct work_struct *work)
|
||||
if (cl->timer_count) {
|
||||
if (--cl->timer_count == 0) {
|
||||
dev_err(dev->dev, "timer: connect/disconnect timeout.\n");
|
||||
mei_reset(dev);
|
||||
mei_connect_timeout(cl);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user