lkml.org 
[lkml]   [2011]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6/8] drivers:misc: ti-st: wait for completion at fail
    Date
    From: Pavan Savoy <pavan_savoy@ti.com>

    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>
    ---
    drivers/misc/ti-st/st_kim.c | 13 +++++++++++++
    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 8061103..ee20fa9 100644
    --- a/drivers/misc/ti-st/st_kim.c
    +++ b/drivers/misc/ti-st/st_kim.c
    @@ -474,6 +474,12 @@ long st_kim_start(void *kim_data)
    pr_info("ldisc_install = 0");
    sysfs_notify(&kim_gdata->kim_pdev->dev.kobj,
    NULL, "install");
    + /* the following wait is never going to be completed,
    + * since the ldisc was never installed, hence serving
    + * as a mdelay of LDISC_TIME msecs */
    + err = wait_for_completion_timeout
    + (&kim_gdata->ldisc_installed,
    + msecs_to_jiffies(LDISC_TIME));
    err = -ETIMEDOUT;
    continue;
    } else {
    @@ -486,6 +492,13 @@ long st_kim_start(void *kim_data)
    pr_info("ldisc_install = 0");
    sysfs_notify(&kim_gdata->kim_pdev->dev.kobj,
    NULL, "install");
    + /* this wait might be completed, though in the
    + * tty_close() since the ldisc is already
    + * installed */
    + err = wait_for_completion_timeout
    + (&kim_gdata->ldisc_installed,
    + msecs_to_jiffies(LDISC_TIME));
    + err = -EINVAL;
    continue;
    } else { /* on success don't retry */
    break;
    --
    1.7.4.1


    \
     
     \ /
      Last update: 2011-08-10 17:23    [W:0.030 / U:154.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site