From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Pavan Savoy <pavan_savoy@ti.com>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 11/13] drivers:misc: ti-st: wait for completion at fail
Date: Fri, 26 Aug 2011 13:33:52 -0700 [thread overview]
Message-ID: <1314390834-3411-11-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <1314390834-3411-1-git-send-email-gregkh@suse.de>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
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 1748a93..d8ca406 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)
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 {
@@ -485,6 +491,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.6.1
next prev parent reply other threads:[~2011-08-26 20:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 19:11 [GIT PATCH] driver core fixes for 3.1 Greg KH
2011-08-26 20:33 ` [PATCH 01/13] firmware: fix google/gsmi.c build warning Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 02/13] driver core: fix kernel-doc warning in platform.c Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 03/13] drivers/base/devtmpfs.c: correct annotation of `setup_done' Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 04/13] pti: add missing CONFIG_PCI dependency Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 05/13] base/devres.c: quiet sparse noise about context imbalance Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 06/13] drivers:misc: ti-st: avoid a misleading dbg msg Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 07/13] drivers:misc:ti-st: platform hooks for chip states Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 08/13] drivers:misc: ti-st: reinit completion on ver read Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 09/13] drivers:misc: ti-st: fail-safe on wrong pkt type Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 10/13] drivers:misc: ti-st: reinit completion before send Greg Kroah-Hartman
2011-08-26 20:33 ` Greg Kroah-Hartman [this message]
2011-08-26 20:33 ` [PATCH 12/13] drivers:misc: ti-st: free skb on firmware download Greg Kroah-Hartman
2011-08-26 20:33 ` [PATCH 13/13] drivers:misc: ti-st: fix unexpected UART close Greg Kroah-Hartman
2011-08-26 20:54 ` [PATCH 01/13] firmware: fix google/gsmi.c build warning Mike Waychison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314390834-3411-11-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pavan_savoy@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®