From: Alan Cox <alan@linux.intel.com>
To: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Ben Dooks <ben-linux@fluff.org>,
Kukjin Kim <kgene.kim@samsung.com>,
Mike Frysinger <vapier@gentoo.org>,
Feng Tang <feng.tang@intel.com>,
Tobias Klauser <tklauser@distanz.ch>,
linux-kernel@vger.kernel.org, yong.y.wang@intel.com,
qi.wang@intel.com, kok.howg.ewe@intel.com,
andrew.chih.howe.khor@intel.com
Subject: Re: [PATCH v3] EG20T: Update PCH_UART driver to 2.6.36
Date: Tue, 16 Nov 2010 13:34:00 +0000 [thread overview]
Message-ID: <20101116133400.11020a70@linux.intel.com> (raw)
In-Reply-To: <4CE126DB.4080500@dsn.okisemi.com>
On Mon, 15 Nov 2010 21:26:03 +0900
Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> wrote:
> Hi Alan,
>
> I have modified for your all indications.
>
> Please check below.
+static int push_rx(struct eg20t_port *priv, const unsigned char *buf,
+ int size)
+{
+ struct uart_port *port;
+ struct tty_struct *tty;
+ int sz, i, j;
+ int loop;
+ int pushed;
+
+ port = &priv->port;
+ tty = tty_port_tty_get(&port->state->port);
+ if (!tty) {
+ pr_debug("%s:tty is busy now", __func__);
+ return -EBUSY;
+ }
+
+ for (pushed = 0, i = 0, loop = 1; (pushed < size) && loop;
+ pushed += sz, i++) {
+ sz = tty_insert_flip_string(tty, &buf[pushed], size - pushed);
+ for (j = 0; (j < 100000) && (sz == 0); j++) {
+ tty_flip_buffer_push(tty);
+ sz = tty_insert_flip_string(tty, &buf[pushed],
+ size - pushed);
+ }
+ }
tty_insert_flip_string will deal with retries itself for the cases you have
here. So you shouldn't need the loop
+static int dma_push_rx(struct eg20t_port *priv, int size)
+{
+ struct tty_struct *tty;
+ int room;
+ struct uart_port *port = &priv->port;
+
+ port = &priv->port;
+ tty = tty_port_tty_get(&port->state->port);
+ if (!tty) {
+ pr_info("%s:tty is busy now", __func__);
As I said last time- this isn't an error or unusual so it shouldn't be
logged
+static void pch_dma_rx_complete(void *arg)
+{
+ struct eg20t_port *priv = arg;
+ struct uart_port *port = &priv->port;
+ struct tty_struct *tty = tty_port_tty_get(&port->state->port);
+ if (!tty) {
+ pr_info("%s:tty is busy now", __func__);
Same comment
Otherwise looks great.
Alan
prev parent reply other threads:[~2010-11-16 13:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 12:26 [PATCH v3] EG20T: Update PCH_UART driver to 2.6.36 Tomoya MORINAGA
2010-11-15 12:40 ` Dan Carpenter
2010-11-16 13:34 ` Alan Cox [this message]
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=20101116133400.11020a70@linux.intel.com \
--to=alan@linux.intel.com \
--cc=andrew.chih.howe.khor@intel.com \
--cc=ben-linux@fluff.org \
--cc=feng.tang@intel.com \
--cc=gregkh@suse.de \
--cc=kgene.kim@samsung.com \
--cc=kok.howg.ewe@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qi.wang@intel.com \
--cc=tklauser@distanz.ch \
--cc=tomoya-linux@dsn.okisemi.com \
--cc=vapier@gentoo.org \
--cc=yong.y.wang@intel.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