summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-06-23 09:37:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-24 16:32:30 -0700
commit4dfaa9f7020b1ff4bf87899f4797d2efd76e80fd (patch)
treea6db3402c8dcf1604e7522b27431e8b026af1e16 /drivers/misc
parent21767546e955c3c1705387ca4548db812382fe08 (diff)
downloadop-kernel-dev-4dfaa9f7020b1ff4bf87899f4797d2efd76e80fd.zip
op-kernel-dev-4dfaa9f7020b1ff4bf87899f4797d2efd76e80fd.tar.gz
mei: do not override a client writing state when buffering
when we buffer write request we should not switch to MEI_WRITING since this will override MEI_WRITE_COMPLETE state of preceding write Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 788f647..11a465a 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -731,7 +731,9 @@ int mei_cl_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb,
}
cl->status = 0;
+ cl->writing_state = MEI_WRITING;
cb->buf_idx += mei_hdr.length;
+
if (mei_hdr.msg_complete) {
if (mei_cl_flow_ctrl_reduce(cl))
return -ENODEV;
@@ -783,7 +785,6 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking)
cb->buf_idx = 0;
/* unseting complete will enqueue the cb for write */
mei_hdr.msg_complete = 0;
- cl->writing_state = MEI_WRITING;
rets = buf->size;
goto out;
}
OpenPOWER on IntegriCloud