mei: consume flow control on the first chunk of writing
authorAlexander Usyskin <alexander.usyskin@intel.com>
Thu, 7 May 2015 12:53:58 +0000 (15:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 May 2015 18:15:53 +0000 (11:15 -0700)
commitb8b730357967ac2ec49dcffd2dc2b354f0fdd011
tree9d2e5d5318fe91b500168cb8feb07f6c555b39a3
parent292f82c86c94c3d419c799e5e3e94e8cf34c69de
mei: consume flow control on the first chunk of writing

Consume the write flow control on the first chunk of the write instead
of on the buffer completion.
We can safely assume that the consequent chunks have the flow control
granted.

This addresses two issues:

1. Blocks other callbacks from the same client riding on the client's
flow control and prevents interleaving of messages as FW cannot distinguish
between two messages from the same client.

2. Fixes single buffer flow control arbitration in a clean way, without
connection/disconnection book keeping

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