summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2015-06-13 20:18:40 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-14 04:48:02 +0200
commitc241e9b1d9ee7292d708d2298bc87f1455aad0c7 (patch)
tree01bc98a4e5bf1b1dfb4c754ce785bfc3666e97ba /drivers
parentMAINTAINERS: mei: add mei_cl_bus.h to maintained file list (diff)
downloadlinux-c241e9b1d9ee7292d708d2298bc87f1455aad0c7.tar.xz
linux-c241e9b1d9ee7292d708d2298bc87f1455aad0c7.zip
mei: reset flow control on the last client disconnection
The FW resets the flow control for single buffer clients when the last host client disconnects, also the driver has to follow this policy and zero the flow control counter in such case. Cc: <stable@vger.kernel.org> #4.1 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/mei/client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 7a5a6636f0fd..d089b136f12c 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -755,6 +755,9 @@ void mei_cl_set_disconnected(struct mei_cl *cl)
if (!WARN_ON(cl->me_cl->connect_count == 0))
cl->me_cl->connect_count--;
+ if (cl->me_cl->connect_count == 0)
+ cl->me_cl->mei_flow_ctrl_creds = 0;
+
mei_me_cl_put(cl->me_cl);
cl->me_cl = NULL;
}