mei: start disconnect request timer consistently
authorAlexander Usyskin <alexander.usyskin@intel.com>
Thu, 17 Jul 2014 07:53:35 +0000 (10:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Sep 2014 23:28:34 +0000 (16:28 -0700)
commit 22b987a325701223f9a37db700c6eb20b9924c6f upstream.

Link must be reset in case the fw doesn't
respond to client disconnect request.
We did charge the timer only in irq path
from mei_cl_irq_close and not in mei_cl_disconnect

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>
drivers/misc/mei/client.c

index 0bb2aa2c6fb072a5ec83823a22b683f56f349f8b..da2385bb3536ee8d203d7f99c2835794ae6cba97 100644 (file)
@@ -405,6 +405,7 @@ int mei_cl_disconnect(struct mei_cl *cl)
                        dev_err(&dev->pdev->dev, "failed to disconnect.\n");
                        goto free;
                }
+               cl->timer_count = MEI_CONNECT_TIMEOUT;
                mdelay(10); /* Wait for hardware disconnection ready */
                list_add_tail(&cb->list, &dev->ctrl_rd_list.list);
        } else {