aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-04-23 00:38:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-23 13:29:58 -0400
commit70135393812f4aa10aa891725786a7657064c2fc (patch)
tree1cda8108939b16f7e76e6b25ef009e0f4c71a8ce /drivers/misc/mei
parent0cfee51c7c1fa47d81b3d116df3b53c586aac422 (diff)
mei: reduce flow control only for completed messages
This fixes bug when only first chunk of a large message split by hbuf_max_len is written to the hardware. All the consequent chunks will not get a new credit. A regression introduced by the commit 0ef319c93cebff9f82bdd0cdbb298f2dd00acda8 mei: streamline write complete flow function Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r--drivers/misc/mei/interrupt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index 74730713a8d3..5ee2f07c929d 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -356,13 +356,14 @@ static int mei_irq_thread_write_complete(struct mei_device *dev, s32 *slots,
356 return -ENODEV; 356 return -ENODEV;
357 } 357 }
358 358
359 if (mei_cl_flow_ctrl_reduce(cl))
360 return -ENODEV;
361 359
362 cl->status = 0; 360 cl->status = 0;
363 cb->buf_idx += mei_hdr.length; 361 cb->buf_idx += mei_hdr.length;
364 if (mei_hdr.msg_complete) 362 if (mei_hdr.msg_complete) {
363 if (mei_cl_flow_ctrl_reduce(cl))
364 return -ENODEV;
365 list_move_tail(&cb->list, &dev->write_waiting_list.list); 365 list_move_tail(&cb->list, &dev->write_waiting_list.list);
366 }
366 367
367 return 0; 368 return 0;
368} 369}