]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mei: fix flow control for single buffer clients
authorAlexander Usyskin <alexander.usyskin@intel.com>
Mon, 4 May 2015 06:43:55 +0000 (09:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 May 2015 18:13:48 +0000 (11:13 -0700)
commita03d77f6ed7dc74d6244e4d8681ba669d7c414aa
tree2f4bebc9c73a30b16017bda5cd532aec4ada2ef3
parentd49ed64a6e3f73975b7eb570c4ea8f37e87d7e5d
mei: fix flow control for single buffer clients

For ME clients that use single receiving buffer
the driver tracks credentials on mei_me_clients structure
for all connections. The driver needs to book keep the shared
resource correctly and track the connections, particularly
the credit has to be cleaned when there is no active connection
to a particular me client. This solves issue when subsequent
connection will not get an ill impression that it can write.

We add active connection counter the particular ME client and
when the counter reach zero, we clear the credits.

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
drivers/misc/mei/mei_dev.h