diff options
-rw-r--r-- | drivers/misc/mei/amthif.c | 10 | ||||
-rw-r--r-- | drivers/misc/mei/init.c | 8 | ||||
-rw-r--r-- | drivers/misc/mei/interrupt.c | 6 | ||||
-rw-r--r-- | drivers/misc/mei/main.c | 5 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 9 |
5 files changed, 18 insertions, 20 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 96db3ad21259..1de28df94da4 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c @@ -124,7 +124,7 @@ struct mei_cl_cb *mei_amthif_find_read_list_entry(struct mei_device *dev, struct mei_cl_cb *next = NULL; list_for_each_entry_safe(pos, next, - &dev->amthi_read_complete_list.list, list) { + &dev->amthif_rd_complete_list.list, list) { cl_temp = (struct mei_cl *)pos->file_private; if (cl_temp && cl_temp == &dev->iamthif_cl && pos->file_object == file) @@ -351,12 +351,12 @@ int mei_amthif_write(struct mei_device *dev, struct mei_cl_cb *cb) cb->major_file_operations = MEI_IOCTL; - if (!list_empty(&dev->amthi_cmd_list.list) || + if (!list_empty(&dev->amthif_cmd_list.list) || dev->iamthif_state != MEI_IAMTHIF_IDLE) { dev_dbg(&dev->pdev->dev, "amthif state = %d\n", dev->iamthif_state); dev_dbg(&dev->pdev->dev, "AMTHIF: add cb to the wait list\n"); - list_add_tail(&cb->list, &dev->amthi_cmd_list.list); + list_add_tail(&cb->list, &dev->amthif_cmd_list.list); return 0; } return mei_amthif_send_cmd(dev, cb); @@ -388,7 +388,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev) dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n"); - list_for_each_entry_safe(pos, next, &dev->amthi_cmd_list.list, list) { + list_for_each_entry_safe(pos, next, &dev->amthif_cmd_list.list, list) { list_del(&pos->list); cl_tmp = (struct mei_cl *)pos->file_private; @@ -589,7 +589,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb) memcpy(cb->response_buffer.data, dev->iamthif_msg_buf, dev->iamthif_msg_buf_index); - list_add_tail(&cb->list, &dev->amthi_read_complete_list.list); + list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list); dev_dbg(&dev->pdev->dev, "amthi read completed\n"); dev->iamthif_timer = jiffies; dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n", diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 8c3c2689f70c..7e6d591fef49 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c @@ -80,8 +80,8 @@ int mei_cl_flush_queues(struct mei_cl *cl) mei_io_list_flush(&cl->dev->write_waiting_list, cl); mei_io_list_flush(&cl->dev->ctrl_wr_list, cl); mei_io_list_flush(&cl->dev->ctrl_rd_list, cl); - mei_io_list_flush(&cl->dev->amthi_cmd_list, cl); - mei_io_list_flush(&cl->dev->amthi_read_complete_list, cl); + mei_io_list_flush(&cl->dev->amthif_cmd_list, cl); + mei_io_list_flush(&cl->dev->amthif_rd_complete_list, cl); return 0; } @@ -117,8 +117,8 @@ struct mei_device *mei_device_init(struct pci_dev *pdev) mei_io_list_init(&dev->write_waiting_list); mei_io_list_init(&dev->ctrl_wr_list); mei_io_list_init(&dev->ctrl_rd_list); - mei_io_list_init(&dev->amthi_cmd_list); - mei_io_list_init(&dev->amthi_read_complete_list); + mei_io_list_init(&dev->amthif_cmd_list); + mei_io_list_init(&dev->amthif_rd_complete_list); dev->pdev = pdev; return dev; } diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 62f8b65fd11a..7193149678ec 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c @@ -1127,7 +1127,6 @@ void mei_timer(struct work_struct *work) unsigned long timeout; struct mei_cl *cl_pos = NULL; struct mei_cl *cl_next = NULL; - struct list_head *amthi_complete_list = NULL; struct mei_cl_cb *cb_pos = NULL; struct mei_cl_cb *cb_next = NULL; @@ -1195,9 +1194,8 @@ void mei_timer(struct work_struct *work) dev_dbg(&dev->pdev->dev, "freeing AMTHI for other requests\n"); - amthi_complete_list = &dev->amthi_read_complete_list.list; - - list_for_each_entry_safe(cb_pos, cb_next, amthi_complete_list, list) { + list_for_each_entry_safe(cb_pos, cb_next, + &dev->amthif_rd_complete_list.list, list) { cl_pos = cb_pos->file_object->private_data; diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index ff50cc14cc39..bea545a5ae2b 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -146,9 +146,8 @@ static bool mei_clear_lists(struct mei_device *dev, struct file *file) bool removed = false; /* remove callbacks associated with a file */ - mei_clear_list(dev, file, &dev->amthi_cmd_list.list); - if (mei_clear_list(dev, file, - &dev->amthi_read_complete_list.list)) + mei_clear_list(dev, file, &dev->amthif_cmd_list.list); + if (mei_clear_list(dev, file, &dev->amthif_rd_complete_list.list)) removed = true; mei_clear_list(dev, file, &dev->ctrl_rd_list.list); diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 8b96d99b8577..ce246b0fb2d6 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h @@ -184,16 +184,13 @@ struct mei_device { /* * lists of queues */ - /* array of pointers to aio lists */ + /* array of pointers to aio lists */ struct mei_cl_cb read_list; /* driver read queue */ struct mei_cl_cb write_list; /* driver write queue */ struct mei_cl_cb write_waiting_list; /* write waiting queue */ struct mei_cl_cb ctrl_wr_list; /* managed write IOCTL list */ struct mei_cl_cb ctrl_rd_list; /* managed read IOCTL list */ - struct mei_cl_cb amthi_cmd_list; /* amthi list for cmd waiting */ - /* driver managed amthi list for reading completed amthi cmd data */ - struct mei_cl_cb amthi_read_complete_list; /* * list of files */ @@ -254,6 +251,10 @@ struct mei_device { unsigned char wd_data[MEI_WD_START_MSG_SIZE]; + /* amthif list for cmd waiting */ + struct mei_cl_cb amthif_cmd_list; + /* driver managed amthif list for reading completed amthif cmd data */ + struct mei_cl_cb amthif_rd_complete_list; struct file *iamthif_file_object; struct mei_cl iamthif_cl; struct mei_cl_cb *iamthif_current_cb; |