Commit 1a1aca42 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

mei: rename remaining amthi strings to amthif

the only real thing that left was mei_amthi_guid
the rest was in the strings and comments
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 038c8a6e
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
#include "hw-me.h" #include "hw-me.h"
#include "client.h" #include "client.h"
const uuid_le mei_amthi_guid = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d, 0xac, const uuid_le mei_amthif_guid = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d,
0xa8, 0x46, 0xe0, 0xff, 0x65, 0xac, 0xa8, 0x46, 0xe0,
0x81, 0x4c); 0xff, 0x65, 0x81, 0x4c);
/** /**
* mei_amthif_reset_params - initializes mei device iamthif * mei_amthif_reset_params - initializes mei device iamthif
...@@ -73,9 +73,9 @@ void mei_amthif_host_init(struct mei_device *dev) ...@@ -73,9 +73,9 @@ void mei_amthif_host_init(struct mei_device *dev)
mei_cl_init(&dev->iamthif_cl, dev); mei_cl_init(&dev->iamthif_cl, dev);
dev->iamthif_cl.state = MEI_FILE_DISCONNECTED; dev->iamthif_cl.state = MEI_FILE_DISCONNECTED;
/* find ME amthi client */ /* find ME amthif client */
i = mei_cl_link_me(&dev->iamthif_cl, i = mei_cl_link_me(&dev->iamthif_cl,
&mei_amthi_guid, MEI_IAMTHIF_HOST_CLIENT_ID); &mei_amthif_guid, MEI_IAMTHIF_HOST_CLIENT_ID);
if (i < 0) { if (i < 0) {
dev_info(&dev->pdev->dev, "failed to find iamthif client.\n"); dev_info(&dev->pdev->dev, "failed to find iamthif client.\n");
return; return;
...@@ -169,10 +169,10 @@ int mei_amthif_read(struct mei_device *dev, struct file *file, ...@@ -169,10 +169,10 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
i = mei_me_cl_by_id(dev, dev->iamthif_cl.me_client_id); i = mei_me_cl_by_id(dev, dev->iamthif_cl.me_client_id);
if (i < 0) { if (i < 0) {
dev_dbg(&dev->pdev->dev, "amthi client not found.\n"); dev_dbg(&dev->pdev->dev, "amthif client not found.\n");
return -ENODEV; return -ENODEV;
} }
dev_dbg(&dev->pdev->dev, "checking amthi data\n"); dev_dbg(&dev->pdev->dev, "checking amthif data\n");
cb = mei_amthif_find_read_list_entry(dev, file); cb = mei_amthif_find_read_list_entry(dev, file);
/* Check for if we can block or not*/ /* Check for if we can block or not*/
...@@ -180,7 +180,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file, ...@@ -180,7 +180,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
return -EAGAIN; return -EAGAIN;
dev_dbg(&dev->pdev->dev, "waiting for amthi data\n"); dev_dbg(&dev->pdev->dev, "waiting for amthif data\n");
while (cb == NULL) { while (cb == NULL) {
/* unlock the Mutex */ /* unlock the Mutex */
mutex_unlock(&dev->device_lock); mutex_unlock(&dev->device_lock);
...@@ -198,17 +198,17 @@ int mei_amthif_read(struct mei_device *dev, struct file *file, ...@@ -198,17 +198,17 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
} }
dev_dbg(&dev->pdev->dev, "Got amthi data\n"); dev_dbg(&dev->pdev->dev, "Got amthif data\n");
dev->iamthif_timer = 0; dev->iamthif_timer = 0;
if (cb) { if (cb) {
timeout = cb->read_time + timeout = cb->read_time +
mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER); mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER);
dev_dbg(&dev->pdev->dev, "amthi timeout = %lud\n", dev_dbg(&dev->pdev->dev, "amthif timeout = %lud\n",
timeout); timeout);
if (time_after(jiffies, timeout)) { if (time_after(jiffies, timeout)) {
dev_dbg(&dev->pdev->dev, "amthi Time out\n"); dev_dbg(&dev->pdev->dev, "amthif Time out\n");
/* 15 sec for the message has expired */ /* 15 sec for the message has expired */
list_del(&cb->list); list_del(&cb->list);
rets = -ETIMEDOUT; rets = -ETIMEDOUT;
...@@ -228,9 +228,9 @@ int mei_amthif_read(struct mei_device *dev, struct file *file, ...@@ -228,9 +228,9 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
* remove message from deletion list * remove message from deletion list
*/ */
dev_dbg(&dev->pdev->dev, "amthi cb->response_buffer size - %d\n", dev_dbg(&dev->pdev->dev, "amthif cb->response_buffer size - %d\n",
cb->response_buffer.size); cb->response_buffer.size);
dev_dbg(&dev->pdev->dev, "amthi cb->buf_idx - %lu\n", cb->buf_idx); dev_dbg(&dev->pdev->dev, "amthif cb->buf_idx - %lu\n", cb->buf_idx);
/* length is being turncated to PAGE_SIZE, however, /* length is being turncated to PAGE_SIZE, however,
* the buf_idx may point beyond */ * the buf_idx may point beyond */
...@@ -246,7 +246,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file, ...@@ -246,7 +246,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
} }
} }
free: free:
dev_dbg(&dev->pdev->dev, "free amthi cb memory.\n"); dev_dbg(&dev->pdev->dev, "free amthif cb memory.\n");
*offset = 0; *offset = 0;
mei_io_cb_free(cb); mei_io_cb_free(cb);
out: out:
...@@ -270,7 +270,7 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb) ...@@ -270,7 +270,7 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb)
if (!dev || !cb) if (!dev || !cb)
return -ENODEV; return -ENODEV;
dev_dbg(&dev->pdev->dev, "write data to amthi client.\n"); dev_dbg(&dev->pdev->dev, "write data to amthif client.\n");
dev->iamthif_state = MEI_IAMTHIF_WRITING; dev->iamthif_state = MEI_IAMTHIF_WRITING;
dev->iamthif_current_cb = cb; dev->iamthif_current_cb = cb;
...@@ -309,12 +309,12 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb) ...@@ -309,12 +309,12 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb)
return -ENODEV; return -ENODEV;
dev->iamthif_flow_control_pending = true; dev->iamthif_flow_control_pending = true;
dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL; dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL;
dev_dbg(&dev->pdev->dev, "add amthi cb to write waiting list\n"); dev_dbg(&dev->pdev->dev, "add amthif cb to write waiting list\n");
dev->iamthif_current_cb = cb; dev->iamthif_current_cb = cb;
dev->iamthif_file_object = cb->file_object; dev->iamthif_file_object = cb->file_object;
list_add_tail(&cb->list, &dev->write_waiting_list.list); list_add_tail(&cb->list, &dev->write_waiting_list.list);
} else { } else {
dev_dbg(&dev->pdev->dev, "message does not complete, so add amthi cb to write list.\n"); dev_dbg(&dev->pdev->dev, "message does not complete, so add amthif cb to write list.\n");
list_add_tail(&cb->list, &dev->write_list.list); list_add_tail(&cb->list, &dev->write_list.list);
} }
} else { } else {
...@@ -383,7 +383,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev) ...@@ -383,7 +383,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev)
dev->iamthif_timer = 0; dev->iamthif_timer = 0;
dev->iamthif_file_object = NULL; dev->iamthif_file_object = NULL;
dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n"); dev_dbg(&dev->pdev->dev, "complete amthif cmd_list cb.\n");
list_for_each_entry_safe(pos, next, &dev->amthif_cmd_list.list, list) { list_for_each_entry_safe(pos, next, &dev->amthif_cmd_list.list, list) {
list_del(&pos->list); list_del(&pos->list);
...@@ -392,7 +392,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev) ...@@ -392,7 +392,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev)
status = mei_amthif_send_cmd(dev, pos); status = mei_amthif_send_cmd(dev, pos);
if (status) { if (status) {
dev_dbg(&dev->pdev->dev, dev_dbg(&dev->pdev->dev,
"amthi write failed status = %d\n", "amthif write failed status = %d\n",
status); status);
return; return;
} }
...@@ -412,7 +412,7 @@ unsigned int mei_amthif_poll(struct mei_device *dev, ...@@ -412,7 +412,7 @@ unsigned int mei_amthif_poll(struct mei_device *dev,
if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE && if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE &&
dev->iamthif_file_object == file) { dev->iamthif_file_object == file) {
mask |= (POLLIN | POLLRDNORM); mask |= (POLLIN | POLLRDNORM);
dev_dbg(&dev->pdev->dev, "run next amthi cb\n"); dev_dbg(&dev->pdev->dev, "run next amthif cb\n");
mei_amthif_run_next_cmd(dev); mei_amthif_run_next_cmd(dev);
} }
return mask; return mask;
...@@ -478,7 +478,7 @@ int mei_amthif_irq_write_complete(struct mei_device *dev, s32 *slots, ...@@ -478,7 +478,7 @@ int mei_amthif_irq_write_complete(struct mei_device *dev, s32 *slots,
dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL; dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL;
dev->iamthif_flow_control_pending = true; dev->iamthif_flow_control_pending = true;
/* save iamthif cb sent to amthi client */ /* save iamthif cb sent to amthif client */
cb->buf_idx = dev->iamthif_msg_buf_index; cb->buf_idx = dev->iamthif_msg_buf_index;
dev->iamthif_current_cb = cb; dev->iamthif_current_cb = cb;
...@@ -491,11 +491,11 @@ int mei_amthif_irq_write_complete(struct mei_device *dev, s32 *slots, ...@@ -491,11 +491,11 @@ int mei_amthif_irq_write_complete(struct mei_device *dev, s32 *slots,
/** /**
* mei_amthif_irq_read_message - read routine after ISR to * mei_amthif_irq_read_message - read routine after ISR to
* handle the read amthi message * handle the read amthif message
* *
* @complete_list: An instance of our list structure * @complete_list: An instance of our list structure
* @dev: the device structure * @dev: the device structure
* @mei_hdr: header of amthi message * @mei_hdr: header of amthif message
* *
* returns 0 on success, <0 on failure. * returns 0 on success, <0 on failure.
*/ */
...@@ -519,10 +519,10 @@ int mei_amthif_irq_read_message(struct mei_cl_cb *complete_list, ...@@ -519,10 +519,10 @@ int mei_amthif_irq_read_message(struct mei_cl_cb *complete_list,
return 0; return 0;
dev_dbg(&dev->pdev->dev, dev_dbg(&dev->pdev->dev,
"amthi_message_buffer_index =%d\n", "amthif_message_buffer_index =%d\n",
mei_hdr->length); mei_hdr->length);
dev_dbg(&dev->pdev->dev, "completed amthi read.\n "); dev_dbg(&dev->pdev->dev, "completed amthif read.\n ");
if (!dev->iamthif_current_cb) if (!dev->iamthif_current_cb)
return -ENODEV; return -ENODEV;
...@@ -537,8 +537,8 @@ int mei_amthif_irq_read_message(struct mei_cl_cb *complete_list, ...@@ -537,8 +537,8 @@ int mei_amthif_irq_read_message(struct mei_cl_cb *complete_list,
cb->read_time = jiffies; cb->read_time = jiffies;
if (dev->iamthif_ioctl && cb->cl == &dev->iamthif_cl) { if (dev->iamthif_ioctl && cb->cl == &dev->iamthif_cl) {
/* found the iamthif cb */ /* found the iamthif cb */
dev_dbg(&dev->pdev->dev, "complete the amthi read cb.\n "); dev_dbg(&dev->pdev->dev, "complete the amthif read cb.\n ");
dev_dbg(&dev->pdev->dev, "add the amthi read cb to complete.\n "); dev_dbg(&dev->pdev->dev, "add the amthif read cb to complete.\n ");
list_add_tail(&cb->list, &complete_list->list); list_add_tail(&cb->list, &complete_list->list);
} }
return 0; return 0;
...@@ -590,7 +590,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb) ...@@ -590,7 +590,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb)
dev->iamthif_msg_buf, dev->iamthif_msg_buf,
dev->iamthif_msg_buf_index); dev->iamthif_msg_buf_index);
list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list); list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list);
dev_dbg(&dev->pdev->dev, "amthi read completed\n"); dev_dbg(&dev->pdev->dev, "amthif read completed\n");
dev->iamthif_timer = jiffies; dev->iamthif_timer = jiffies;
dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n", dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n",
dev->iamthif_timer); dev->iamthif_timer);
...@@ -598,7 +598,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb) ...@@ -598,7 +598,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb)
mei_amthif_run_next_cmd(dev); mei_amthif_run_next_cmd(dev);
} }
dev_dbg(&dev->pdev->dev, "completing amthi call back.\n"); dev_dbg(&dev->pdev->dev, "completing amthif call back.\n");
wake_up_interruptible(&dev->iamthif_cl.wait); wake_up_interruptible(&dev->iamthif_cl.wait);
} }
...@@ -704,11 +704,11 @@ int mei_amthif_release(struct mei_device *dev, struct file *file) ...@@ -704,11 +704,11 @@ int mei_amthif_release(struct mei_device *dev, struct file *file)
if (dev->iamthif_file_object == file && if (dev->iamthif_file_object == file &&
dev->iamthif_state != MEI_IAMTHIF_IDLE) { dev->iamthif_state != MEI_IAMTHIF_IDLE) {
dev_dbg(&dev->pdev->dev, "amthi canceled iamthif state %d\n", dev_dbg(&dev->pdev->dev, "amthif canceled iamthif state %d\n",
dev->iamthif_state); dev->iamthif_state);
dev->iamthif_canceled = true; dev->iamthif_canceled = true;
if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE) { if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE) {
dev_dbg(&dev->pdev->dev, "run next amthi iamthif cb\n"); dev_dbg(&dev->pdev->dev, "run next amthif iamthif cb\n");
mei_amthif_run_next_cmd(dev); mei_amthif_run_next_cmd(dev);
} }
} }
......
...@@ -345,7 +345,7 @@ void mei_host_client_init(struct work_struct *work) ...@@ -345,7 +345,7 @@ void mei_host_client_init(struct work_struct *work)
for (i = 0; i < dev->me_clients_num; i++) { for (i = 0; i < dev->me_clients_num; i++) {
client_props = &dev->me_clients[i].props; client_props = &dev->me_clients[i].props;
if (!uuid_le_cmp(client_props->protocol_name, mei_amthi_guid)) if (!uuid_le_cmp(client_props->protocol_name, mei_amthif_guid))
mei_amthif_host_init(dev); mei_amthif_host_init(dev);
else if (!uuid_le_cmp(client_props->protocol_name, mei_wd_guid)) else if (!uuid_le_cmp(client_props->protocol_name, mei_wd_guid))
mei_wd_host_init(dev); mei_wd_host_init(dev);
......
...@@ -497,7 +497,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf, ...@@ -497,7 +497,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
if (rets) { if (rets) {
dev_err(&dev->pdev->dev, dev_err(&dev->pdev->dev,
"amthi write failed with status = %d\n", rets); "amthif write failed with status = %d\n", rets);
goto err; goto err;
} }
mutex_unlock(&dev->device_lock); mutex_unlock(&dev->device_lock);
...@@ -611,10 +611,10 @@ static int mei_ioctl_connect_client(struct file *file, ...@@ -611,10 +611,10 @@ static int mei_ioctl_connect_client(struct file *file,
dev_dbg(&dev->pdev->dev, "FW Client - Max Msg Len = %d\n", dev_dbg(&dev->pdev->dev, "FW Client - Max Msg Len = %d\n",
dev->me_clients[i].props.max_msg_length); dev->me_clients[i].props.max_msg_length);
/* if we're connecting to amthi client then we will use the /* if we're connecting to amthif client then we will use the
* existing connection * existing connection
*/ */
if (uuid_le_cmp(data->in_client_uuid, mei_amthi_guid) == 0) { if (uuid_le_cmp(data->in_client_uuid, mei_amthif_guid) == 0) {
dev_dbg(&dev->pdev->dev, "FW Client is amthi\n"); dev_dbg(&dev->pdev->dev, "FW Client is amthi\n");
if (dev->iamthif_cl.state != MEI_FILE_CONNECTED) { if (dev->iamthif_cl.state != MEI_FILE_CONNECTED) {
rets = -ENODEV; rets = -ENODEV;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
/* /*
* AMTHI Client UUID * AMTHI Client UUID
*/ */
extern const uuid_le mei_amthi_guid; extern const uuid_le mei_amthif_guid;
/* /*
* Watchdog Client UUID * Watchdog Client UUID
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment