aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r--drivers/misc/mei/init.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 1f13eb97a10a..e6951ec4840f 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -184,7 +184,8 @@ int mei_hw_init(struct mei_device *dev)
184 if (!dev->recvd_msg) { 184 if (!dev->recvd_msg) {
185 mutex_unlock(&dev->device_lock); 185 mutex_unlock(&dev->device_lock);
186 err = wait_event_interruptible_timeout(dev->wait_recvd_msg, 186 err = wait_event_interruptible_timeout(dev->wait_recvd_msg,
187 dev->recvd_msg, MEI_INTEROP_TIMEOUT); 187 dev->recvd_msg,
188 mei_secs_to_jiffies(MEI_INTEROP_TIMEOUT));
188 mutex_lock(&dev->device_lock); 189 mutex_lock(&dev->device_lock);
189 } 190 }
190 191
@@ -381,7 +382,7 @@ void mei_host_start_message(struct mei_device *dev)
381 mei_reset(dev, 1); 382 mei_reset(dev, 1);
382 } 383 }
383 dev->init_clients_state = MEI_START_MESSAGE; 384 dev->init_clients_state = MEI_START_MESSAGE;
384 dev->init_clients_timer = INIT_CLIENTS_TIMEOUT; 385 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
385 return ; 386 return ;
386} 387}
387 388
@@ -414,7 +415,7 @@ void mei_host_enum_clients_message(struct mei_device *dev)
414 mei_reset(dev, 1); 415 mei_reset(dev, 1);
415 } 416 }
416 dev->init_clients_state = MEI_ENUM_CLIENTS_MESSAGE; 417 dev->init_clients_state = MEI_ENUM_CLIENTS_MESSAGE;
417 dev->init_clients_timer = INIT_CLIENTS_TIMEOUT; 418 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
418 return; 419 return;
419} 420}
420 421
@@ -502,7 +503,7 @@ int mei_host_client_properties(struct mei_device *dev)
502 return -EIO; 503 return -EIO;
503 } 504 }
504 505
505 dev->init_clients_timer = INIT_CLIENTS_TIMEOUT; 506 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
506 dev->me_client_index = b; 507 dev->me_client_index = b;
507 return 1; 508 return 1;
508 } 509 }
@@ -621,7 +622,7 @@ void mei_host_init_iamthif(struct mei_device *dev)
621 dev->iamthif_cl.state = MEI_FILE_DISCONNECTED; 622 dev->iamthif_cl.state = MEI_FILE_DISCONNECTED;
622 dev->iamthif_cl.host_client_id = 0; 623 dev->iamthif_cl.host_client_id = 0;
623 } else { 624 } else {
624 dev->iamthif_cl.timer_count = CONNECT_TIMEOUT; 625 dev->iamthif_cl.timer_count = MEI_CONNECT_TIMEOUT;
625 } 626 }
626} 627}
627 628
@@ -658,9 +659,8 @@ struct mei_cl *mei_cl_allocate(struct mei_device *dev)
658 */ 659 */
659int mei_disconnect_host_client(struct mei_device *dev, struct mei_cl *cl) 660int mei_disconnect_host_client(struct mei_device *dev, struct mei_cl *cl)
660{ 661{
661 int rets, err;
662 long timeout = 15; /* 15 seconds */
663 struct mei_cl_cb *cb; 662 struct mei_cl_cb *cb;
663 int rets, err;
664 664
665 if (!dev || !cl) 665 if (!dev || !cl)
666 return -ENODEV; 666 return -ENODEV;
@@ -690,8 +690,8 @@ int mei_disconnect_host_client(struct mei_device *dev, struct mei_cl *cl)
690 mutex_unlock(&dev->device_lock); 690 mutex_unlock(&dev->device_lock);
691 691
692 err = wait_event_timeout(dev->wait_recvd_msg, 692 err = wait_event_timeout(dev->wait_recvd_msg,
693 (MEI_FILE_DISCONNECTED == cl->state), 693 MEI_FILE_DISCONNECTED == cl->state,
694 timeout * HZ); 694 mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT));
695 695
696 mutex_lock(&dev->device_lock); 696 mutex_lock(&dev->device_lock);
697 if (MEI_FILE_DISCONNECTED == cl->state) { 697 if (MEI_FILE_DISCONNECTED == cl->state) {