提交 4dfaa9f7 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

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: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 21767546
...@@ -731,7 +731,9 @@ int mei_cl_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb, ...@@ -731,7 +731,9 @@ int mei_cl_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb,
} }
cl->status = 0; cl->status = 0;
cl->writing_state = MEI_WRITING;
cb->buf_idx += mei_hdr.length; cb->buf_idx += mei_hdr.length;
if (mei_hdr.msg_complete) { if (mei_hdr.msg_complete) {
if (mei_cl_flow_ctrl_reduce(cl)) if (mei_cl_flow_ctrl_reduce(cl))
return -ENODEV; return -ENODEV;
...@@ -783,7 +785,6 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking) ...@@ -783,7 +785,6 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking)
cb->buf_idx = 0; cb->buf_idx = 0;
/* unseting complete will enqueue the cb for write */ /* unseting complete will enqueue the cb for write */
mei_hdr.msg_complete = 0; mei_hdr.msg_complete = 0;
cl->writing_state = MEI_WRITING;
rets = buf->size; rets = buf->size;
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册