aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r--drivers/misc/mei/client.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 1ee2b9492a82..89a557972d1b 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -666,7 +666,6 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length)
666 goto err; 666 goto err;
667 667
668 cb->fop_type = MEI_FOP_READ; 668 cb->fop_type = MEI_FOP_READ;
669 cl->read_cb = cb;
670 if (dev->hbuf_is_ready) { 669 if (dev->hbuf_is_ready) {
671 dev->hbuf_is_ready = false; 670 dev->hbuf_is_ready = false;
672 if (mei_hbm_cl_flow_control_req(dev, cl)) { 671 if (mei_hbm_cl_flow_control_req(dev, cl)) {
@@ -678,6 +677,9 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length)
678 } else { 677 } else {
679 list_add_tail(&cb->list, &dev->ctrl_wr_list.list); 678 list_add_tail(&cb->list, &dev->ctrl_wr_list.list);
680 } 679 }
680
681 cl->read_cb = cb;
682
681 return rets; 683 return rets;
682err: 684err:
683 mei_io_cb_free(cb); 685 mei_io_cb_free(cb);
@@ -908,7 +910,6 @@ void mei_cl_all_disconnect(struct mei_device *dev)
908 list_for_each_entry_safe(cl, next, &dev->file_list, link) { 910 list_for_each_entry_safe(cl, next, &dev->file_list, link) {
909 cl->state = MEI_FILE_DISCONNECTED; 911 cl->state = MEI_FILE_DISCONNECTED;
910 cl->mei_flow_ctrl_creds = 0; 912 cl->mei_flow_ctrl_creds = 0;
911 cl->read_cb = NULL;
912 cl->timer_count = 0; 913 cl->timer_count = 0;
913 } 914 }
914} 915}
@@ -942,8 +943,16 @@ void mei_cl_all_wakeup(struct mei_device *dev)
942void mei_cl_all_write_clear(struct mei_device *dev) 943void mei_cl_all_write_clear(struct mei_device *dev)
943{ 944{
944 struct mei_cl_cb *cb, *next; 945 struct mei_cl_cb *cb, *next;
946 struct list_head *list;
947
948 list = &dev->write_list.list;
949 list_for_each_entry_safe(cb, next, list, list) {
950 list_del(&cb->list);
951 mei_io_cb_free(cb);
952 }
945 953
946 list_for_each_entry_safe(cb, next, &dev->write_list.list, list) { 954 list = &dev->write_waiting_list.list;
955 list_for_each_entry_safe(cb, next, list, list) {
947 list_del(&cb->list); 956 list_del(&cb->list);
948 mei_io_cb_free(cb); 957 mei_io_cb_free(cb);
949 } 958 }