aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-01-08 16:07:21 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-08 19:40:46 -0500
commit1a1aca42c989051dce34d49b4e04a25dafe01d74 (patch)
tree8fa9d6a80246528736dd6df80df60c7c7eb2619e
parent038c8a6ebc50ec981557f02197ed2dc5795c40fb (diff)
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: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/mei/amthif.c62
-rw-r--r--drivers/misc/mei/client.c2
-rw-r--r--drivers/misc/mei/main.c6
-rw-r--r--drivers/misc/mei/mei_dev.h2
4 files changed, 36 insertions, 36 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index adc4120c91d3..64a9bfa5ad20 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -38,9 +38,9 @@
38#include "hw-me.h" 38#include "hw-me.h"
39#include "client.h" 39#include "client.h"
40 40
41const uuid_le mei_amthi_guid = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d, 0xac, 41const uuid_le mei_amthif_guid = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d,
42 0xa8, 0x46, 0xe0, 0xff, 0x65, 42 0xac, 0xa8, 0x46, 0xe0,
43 0x81, 0x4c); 43 0xff, 0x65, 0x81, 0x4c);
44 44
45/** 45/**
46 * mei_amthif_reset_params - initializes mei device iamthif 46 * mei_amthif_reset_params - initializes mei device iamthif
@@ -73,9 +73,9 @@ void mei_amthif_host_init(struct mei_device *dev)
73 mei_cl_init(&dev->iamthif_cl, dev); 73 mei_cl_init(&dev->iamthif_cl, dev);
74 dev->iamthif_cl.state = MEI_FILE_DISCONNECTED; 74 dev->iamthif_cl.state = MEI_FILE_DISCONNECTED;
75 75
76 /* find ME amthi client */ 76 /* find ME amthif client */
77 i = mei_cl_link_me(&dev->iamthif_cl, 77 i = mei_cl_link_me(&dev->iamthif_cl,
78 &mei_amthi_guid, MEI_IAMTHIF_HOST_CLIENT_ID); 78 &mei_amthif_guid, MEI_IAMTHIF_HOST_CLIENT_ID);
79 if (i < 0) { 79 if (i < 0) {
80 dev_info(&dev->pdev->dev, "failed to find iamthif client.\n"); 80 dev_info(&dev->pdev->dev, "failed to find iamthif client.\n");
81 return; 81 return;
@@ -169,10 +169,10 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
169 i = mei_me_cl_by_id(dev, dev->iamthif_cl.me_client_id); 169 i = mei_me_cl_by_id(dev, dev->iamthif_cl.me_client_id);
170 170
171 if (i < 0) { 171 if (i < 0) {
172 dev_dbg(&dev->pdev->dev, "amthi client not found.\n"); 172 dev_dbg(&dev->pdev->dev, "amthif client not found.\n");
173 return -ENODEV; 173 return -ENODEV;
174 } 174 }
175 dev_dbg(&dev->pdev->dev, "checking amthi data\n"); 175 dev_dbg(&dev->pdev->dev, "checking amthif data\n");
176 cb = mei_amthif_find_read_list_entry(dev, file); 176 cb = mei_amthif_find_read_list_entry(dev, file);
177 177
178 /* Check for if we can block or not*/ 178 /* Check for if we can block or not*/
@@ -180,7 +180,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
180 return -EAGAIN; 180 return -EAGAIN;
181 181
182 182
183 dev_dbg(&dev->pdev->dev, "waiting for amthi data\n"); 183 dev_dbg(&dev->pdev->dev, "waiting for amthif data\n");
184 while (cb == NULL) { 184 while (cb == NULL) {
185 /* unlock the Mutex */ 185 /* unlock the Mutex */
186 mutex_unlock(&dev->device_lock); 186 mutex_unlock(&dev->device_lock);
@@ -198,17 +198,17 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
198 } 198 }
199 199
200 200
201 dev_dbg(&dev->pdev->dev, "Got amthi data\n"); 201 dev_dbg(&dev->pdev->dev, "Got amthif data\n");
202 dev->iamthif_timer = 0; 202 dev->iamthif_timer = 0;
203 203
204 if (cb) { 204 if (cb) {
205 timeout = cb->read_time + 205 timeout = cb->read_time +
206 mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER); 206 mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER);
207 dev_dbg(&dev->pdev->dev, "amthi timeout = %lud\n", 207 dev_dbg(&dev->pdev->dev, "amthif timeout = %lud\n",
208 timeout); 208 timeout);
209 209
210 if (time_after(jiffies, timeout)) { 210 if (time_after(jiffies, timeout)) {
211 dev_dbg(&dev->pdev->dev, "amthi Time out\n"); 211 dev_dbg(&dev->pdev->dev, "amthif Time out\n");
212 /* 15 sec for the message has expired */ 212 /* 15 sec for the message has expired */
213 list_del(&cb->list); 213 list_del(&cb->list);
214 rets = -ETIMEDOUT; 214 rets = -ETIMEDOUT;
@@ -228,9 +228,9 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
228 * remove message from deletion list 228 * remove message from deletion list
229 */ 229 */
230 230
231 dev_dbg(&dev->pdev->dev, "amthi cb->response_buffer size - %d\n", 231 dev_dbg(&dev->pdev->dev, "amthif cb->response_buffer size - %d\n",
232 cb->response_buffer.size); 232 cb->response_buffer.size);
233 dev_dbg(&dev->pdev->dev, "amthi cb->buf_idx - %lu\n", cb->buf_idx); 233 dev_dbg(&dev->pdev->dev, "amthif cb->buf_idx - %lu\n", cb->buf_idx);
234 234
235 /* length is being turncated to PAGE_SIZE, however, 235 /* length is being turncated to PAGE_SIZE, however,
236 * the buf_idx may point beyond */ 236 * the buf_idx may point beyond */
@@ -246,7 +246,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
246 } 246 }
247 } 247 }
248free: 248free:
249 dev_dbg(&dev->pdev->dev, "free amthi cb memory.\n"); 249 dev_dbg(&dev->pdev->dev, "free amthif cb memory.\n");
250 *offset = 0; 250 *offset = 0;
251 mei_io_cb_free(cb); 251 mei_io_cb_free(cb);
252out: 252out:
@@ -270,7 +270,7 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb)
270 if (!dev || !cb) 270 if (!dev || !cb)
271 return -ENODEV; 271 return -ENODEV;
272 272
273 dev_dbg(&dev->pdev->dev, "write data to amthi client.\n"); 273 dev_dbg(&dev->pdev->dev, "write data to amthif client.\n");
274 274
275 dev->iamthif_state = MEI_IAMTHIF_WRITING; 275 dev->iamthif_state = MEI_IAMTHIF_WRITING;
276 dev->iamthif_current_cb = cb; 276 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 return -ENODEV; 309 return -ENODEV;
310 dev->iamthif_flow_control_pending = true; 310 dev->iamthif_flow_control_pending = true;
311 dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL; 311 dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL;
312 dev_dbg(&dev->pdev->dev, "add amthi cb to write waiting list\n"); 312 dev_dbg(&dev->pdev->dev, "add amthif cb to write waiting list\n");
313 dev->iamthif_current_cb = cb; 313 dev->iamthif_current_cb = cb;
314 dev->iamthif_file_object = cb->file_object; 314 dev->iamthif_file_object = cb->file_object;
315 list_add_tail(&cb->list, &dev->write_waiting_list.list); 315 list_add_tail(&cb->list, &dev->write_waiting_list.list);
316 } else { 316 } else {
317 dev_dbg(&dev->pdev->dev, "message does not complete, so add amthi cb to write list.\n"); 317 dev_dbg(&dev->pdev->dev, "message does not complete, so add amthif cb to write list.\n");
318 list_add_tail(&cb->list, &dev->write_list.list); 318 list_add_tail(&cb->list, &dev->write_list.list);
319 } 319 }
320 } else { 320 } else {
@@ -383,7 +383,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev)
383 dev->iamthif_timer = 0; 383 dev->iamthif_timer = 0;
384 dev->iamthif_file_object = NULL; 384 dev->iamthif_file_object = NULL;
385 385
386 dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n"); 386 dev_dbg(&dev->pdev->dev, "complete amthif cmd_list cb.\n");
387 387
388 list_for_each_entry_safe(pos, next, &dev->amthif_cmd_list.list, list) { 388 list_for_each_entry_safe(pos, next, &dev->amthif_cmd_list.list, list) {
389 list_del(&pos->list); 389 list_del(&pos->list);
@@ -392,7 +392,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev)
392 status = mei_amthif_send_cmd(dev, pos); 392 status = mei_amthif_send_cmd(dev, pos);
393 if (status) { 393 if (status) {
394 dev_dbg(&dev->pdev->dev, 394 dev_dbg(&dev->pdev->dev,
395 "amthi write failed status = %d\n", 395 "amthif write failed status = %d\n",
396 status); 396 status);
397 return; 397 return;
398 } 398 }
@@ -412,7 +412,7 @@ unsigned int mei_amthif_poll(struct mei_device *dev,
412 if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE && 412 if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE &&
413 dev->iamthif_file_object == file) { 413 dev->iamthif_file_object == file) {
414 mask |= (POLLIN | POLLRDNORM); 414 mask |= (POLLIN | POLLRDNORM);
415 dev_dbg(&dev->pdev->dev, "run next amthi cb\n"); 415 dev_dbg(&dev->pdev->dev, "run next amthif cb\n");
416 mei_amthif_run_next_cmd(dev); 416 mei_amthif_run_next_cmd(dev);
417 } 417 }
418 return mask; 418 return mask;
@@ -478,7 +478,7 @@ int mei_amthif_irq_write_complete(struct mei_device *dev, s32 *slots,
478 dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL; 478 dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL;
479 dev->iamthif_flow_control_pending = true; 479 dev->iamthif_flow_control_pending = true;
480 480
481 /* save iamthif cb sent to amthi client */ 481 /* save iamthif cb sent to amthif client */
482 cb->buf_idx = dev->iamthif_msg_buf_index; 482 cb->buf_idx = dev->iamthif_msg_buf_index;
483 dev->iamthif_current_cb = cb; 483 dev->iamthif_current_cb = cb;
484 484
@@ -491,11 +491,11 @@ int mei_amthif_irq_write_complete(struct mei_device *dev, s32 *slots,
491 491
492/** 492/**
493 * mei_amthif_irq_read_message - read routine after ISR to 493 * mei_amthif_irq_read_message - read routine after ISR to
494 * handle the read amthi message 494 * handle the read amthif message
495 * 495 *
496 * @complete_list: An instance of our list structure 496 * @complete_list: An instance of our list structure
497 * @dev: the device structure 497 * @dev: the device structure
498 * @mei_hdr: header of amthi message 498 * @mei_hdr: header of amthif message
499 * 499 *
500 * returns 0 on success, <0 on failure. 500 * returns 0 on success, <0 on failure.
501 */ 501 */
@@ -519,10 +519,10 @@ int mei_amthif_irq_read_message(struct mei_cl_cb *complete_list,
519 return 0; 519 return 0;
520 520
521 dev_dbg(&dev->pdev->dev, 521 dev_dbg(&dev->pdev->dev,
522 "amthi_message_buffer_index =%d\n", 522 "amthif_message_buffer_index =%d\n",
523 mei_hdr->length); 523 mei_hdr->length);
524 524
525 dev_dbg(&dev->pdev->dev, "completed amthi read.\n "); 525 dev_dbg(&dev->pdev->dev, "completed amthif read.\n ");
526 if (!dev->iamthif_current_cb) 526 if (!dev->iamthif_current_cb)
527 return -ENODEV; 527 return -ENODEV;
528 528
@@ -537,8 +537,8 @@ int mei_amthif_irq_read_message(struct mei_cl_cb *complete_list,
537 cb->read_time = jiffies; 537 cb->read_time = jiffies;
538 if (dev->iamthif_ioctl && cb->cl == &dev->iamthif_cl) { 538 if (dev->iamthif_ioctl && cb->cl == &dev->iamthif_cl) {
539 /* found the iamthif cb */ 539 /* found the iamthif cb */
540 dev_dbg(&dev->pdev->dev, "complete the amthi read cb.\n "); 540 dev_dbg(&dev->pdev->dev, "complete the amthif read cb.\n ");
541 dev_dbg(&dev->pdev->dev, "add the amthi read cb to complete.\n "); 541 dev_dbg(&dev->pdev->dev, "add the amthif read cb to complete.\n ");
542 list_add_tail(&cb->list, &complete_list->list); 542 list_add_tail(&cb->list, &complete_list->list);
543 } 543 }
544 return 0; 544 return 0;
@@ -590,7 +590,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb)
590 dev->iamthif_msg_buf, 590 dev->iamthif_msg_buf,
591 dev->iamthif_msg_buf_index); 591 dev->iamthif_msg_buf_index);
592 list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list); 592 list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list);
593 dev_dbg(&dev->pdev->dev, "amthi read completed\n"); 593 dev_dbg(&dev->pdev->dev, "amthif read completed\n");
594 dev->iamthif_timer = jiffies; 594 dev->iamthif_timer = jiffies;
595 dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n", 595 dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n",
596 dev->iamthif_timer); 596 dev->iamthif_timer);
@@ -598,7 +598,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb)
598 mei_amthif_run_next_cmd(dev); 598 mei_amthif_run_next_cmd(dev);
599 } 599 }
600 600
601 dev_dbg(&dev->pdev->dev, "completing amthi call back.\n"); 601 dev_dbg(&dev->pdev->dev, "completing amthif call back.\n");
602 wake_up_interruptible(&dev->iamthif_cl.wait); 602 wake_up_interruptible(&dev->iamthif_cl.wait);
603} 603}
604 604
@@ -704,11 +704,11 @@ int mei_amthif_release(struct mei_device *dev, struct file *file)
704 if (dev->iamthif_file_object == file && 704 if (dev->iamthif_file_object == file &&
705 dev->iamthif_state != MEI_IAMTHIF_IDLE) { 705 dev->iamthif_state != MEI_IAMTHIF_IDLE) {
706 706
707 dev_dbg(&dev->pdev->dev, "amthi canceled iamthif state %d\n", 707 dev_dbg(&dev->pdev->dev, "amthif canceled iamthif state %d\n",
708 dev->iamthif_state); 708 dev->iamthif_state);
709 dev->iamthif_canceled = true; 709 dev->iamthif_canceled = true;
710 if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE) { 710 if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE) {
711 dev_dbg(&dev->pdev->dev, "run next amthi iamthif cb\n"); 711 dev_dbg(&dev->pdev->dev, "run next amthif iamthif cb\n");
712 mei_amthif_run_next_cmd(dev); 712 mei_amthif_run_next_cmd(dev);
713 } 713 }
714 } 714 }
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 231eda2b09e1..8103d94facb8 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -345,7 +345,7 @@ void mei_host_client_init(struct work_struct *work)
345 for (i = 0; i < dev->me_clients_num; i++) { 345 for (i = 0; i < dev->me_clients_num; i++) {
346 client_props = &dev->me_clients[i].props; 346 client_props = &dev->me_clients[i].props;
347 347
348 if (!uuid_le_cmp(client_props->protocol_name, mei_amthi_guid)) 348 if (!uuid_le_cmp(client_props->protocol_name, mei_amthif_guid))
349 mei_amthif_host_init(dev); 349 mei_amthif_host_init(dev);
350 else if (!uuid_le_cmp(client_props->protocol_name, mei_wd_guid)) 350 else if (!uuid_le_cmp(client_props->protocol_name, mei_wd_guid))
351 mei_wd_host_init(dev); 351 mei_wd_host_init(dev);
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 5c7c85505c91..d5d1a5957d5f 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -497,7 +497,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
497 497
498 if (rets) { 498 if (rets) {
499 dev_err(&dev->pdev->dev, 499 dev_err(&dev->pdev->dev,
500 "amthi write failed with status = %d\n", rets); 500 "amthif write failed with status = %d\n", rets);
501 goto err; 501 goto err;
502 } 502 }
503 mutex_unlock(&dev->device_lock); 503 mutex_unlock(&dev->device_lock);
@@ -611,10 +611,10 @@ static int mei_ioctl_connect_client(struct file *file,
611 dev_dbg(&dev->pdev->dev, "FW Client - Max Msg Len = %d\n", 611 dev_dbg(&dev->pdev->dev, "FW Client - Max Msg Len = %d\n",
612 dev->me_clients[i].props.max_msg_length); 612 dev->me_clients[i].props.max_msg_length);
613 613
614 /* if we're connecting to amthi client then we will use the 614 /* if we're connecting to amthif client then we will use the
615 * existing connection 615 * existing connection
616 */ 616 */
617 if (uuid_le_cmp(data->in_client_uuid, mei_amthi_guid) == 0) { 617 if (uuid_le_cmp(data->in_client_uuid, mei_amthif_guid) == 0) {
618 dev_dbg(&dev->pdev->dev, "FW Client is amthi\n"); 618 dev_dbg(&dev->pdev->dev, "FW Client is amthi\n");
619 if (dev->iamthif_cl.state != MEI_FILE_CONNECTED) { 619 if (dev->iamthif_cl.state != MEI_FILE_CONNECTED) {
620 rets = -ENODEV; 620 rets = -ENODEV;
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 681c0ee7a5de..285e8e01d429 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -46,7 +46,7 @@
46/* 46/*
47 * AMTHI Client UUID 47 * AMTHI Client UUID
48 */ 48 */
49extern const uuid_le mei_amthi_guid; 49extern const uuid_le mei_amthif_guid;
50 50
51/* 51/*
52 * Watchdog Client UUID 52 * Watchdog Client UUID