diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-09-16 23:44:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 08:42:02 -0700 |
commit | 136698e535cd1ce59e436cc084b41370fd8f1eff (patch) | |
tree | 4f0b6e33c8b2c0250b8b16e9515fea84a3b23984 /drivers/misc/mei/amthif.c | |
parent | 2ebf8c94d431078d93599ba56efa58bf850078a1 (diff) | |
download | op-kernel-dev-136698e535cd1ce59e436cc084b41370fd8f1eff.zip op-kernel-dev-136698e535cd1ce59e436cc084b41370fd8f1eff.tar.gz |
mei: push credentials inside the irq write handler
this eventually allows as use a single write queue
both for control and data messages and removing possible
race
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/amthif.c')
-rw-r--r-- | drivers/misc/mei/amthif.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 718f3a1..04fd385 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c @@ -460,6 +460,15 @@ int mei_amthif_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb, u32 msg_slots = mei_data2slots(len); int rets; + rets = mei_cl_flow_ctrl_creds(cl); + if (rets < 0) + return rets; + + if (rets == 0) { + cl_dbg(dev, cl, "No flow control credentials: not sending.\n"); + return 0; + } + mei_hdr.host_addr = cl->host_client_id; mei_hdr.me_addr = cl->me_client_id; mei_hdr.reserved = 0; |