]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mei: reset flow control on the last client disconnection
authorAlexander Usyskin <alexander.usyskin@intel.com>
Sat, 13 Jun 2015 18:18:40 +0000 (21:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Jun 2015 02:48:02 +0000 (19:48 -0700)
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>
drivers/misc/mei/client.c

index 7a5a6636f0fd07ae2447ce8bd5a9420fcb1a1c5b..d089b136f12c5c2e08ac9efef1271ab4a1dd3fdf 100644 (file)
@@ -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;
 }