From: Alexander Usyskin Date: Sat, 13 Jun 2015 18:18:40 +0000 (+0300) Subject: mei: reset flow control on the last client disconnection X-Git-Tag: v4.2-rc1~90^2~1 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=c241e9b1d9ee7292d708d2298bc87f1455aad0c7;p=linux.git 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: #4.1 Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- 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; }