aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/ti-st
diff options
context:
space:
mode:
authorPavan Savoy <pavan_savoy@ti.com>2011-08-10 11:18:35 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-22 17:13:34 -0400
commitd0344ef670d686628f369e649c86f71c90ebe222 (patch)
tree20dd638b798f38058bb0db756383e743d5332530 /drivers/misc/ti-st
parent2f81a02ce0693863019dc3fcc532533af6dc0dcd (diff)
drivers:misc: ti-st: wait for completion at fail
When the line discipline install fails for reasons such as missing user-space UIM or broken communication between UIM and ST driver, then the ST attempts/retries to request for ldisc installation again. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/misc/ti-st')
-rw-r--r--drivers/misc/ti-st/st_kim.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index 1748a9351de0..d8ca4068a928 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -473,6 +473,12 @@ long st_kim_start(void *kim_data)
473 pr_info("ldisc_install = 0"); 473 pr_info("ldisc_install = 0");
474 sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, 474 sysfs_notify(&kim_gdata->kim_pdev->dev.kobj,
475 NULL, "install"); 475 NULL, "install");
476 /* the following wait is never going to be completed,
477 * since the ldisc was never installed, hence serving
478 * as a mdelay of LDISC_TIME msecs */
479 err = wait_for_completion_timeout
480 (&kim_gdata->ldisc_installed,
481 msecs_to_jiffies(LDISC_TIME));
476 err = -ETIMEDOUT; 482 err = -ETIMEDOUT;
477 continue; 483 continue;
478 } else { 484 } else {
@@ -485,6 +491,13 @@ long st_kim_start(void *kim_data)
485 pr_info("ldisc_install = 0"); 491 pr_info("ldisc_install = 0");
486 sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, 492 sysfs_notify(&kim_gdata->kim_pdev->dev.kobj,
487 NULL, "install"); 493 NULL, "install");
494 /* this wait might be completed, though in the
495 * tty_close() since the ldisc is already
496 * installed */
497 err = wait_for_completion_timeout
498 (&kim_gdata->ldisc_installed,
499 msecs_to_jiffies(LDISC_TIME));
500 err = -EINVAL;
488 continue; 501 continue;
489 } else { /* on success don't retry */ 502 } else { /* on success don't retry */
490 break; 503 break;