From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: <alan@linux.intel.com>, <gregkh@linuxfoundation.org>,
<jslaby@suse.cz>, <grant.likely@secretlab.ca>,
<rob.herring@calxeda.com>, <devicetree-discuss@lists.ozlabs.org>,
<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-serial@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<swarren@wwwdotorg.org>
Subject: Re: [PATCH] serial: tegra: add serial driver
Date: Mon, 17 Dec 2012 18:23:43 +0000 [thread overview]
Message-ID: <20121217182343.37324522@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <1355746249-15347-1-git-send-email-ldewangan@nvidia.com>
> +
> +static void tegra_uart_copy_rx_to_tty(struct tegra_uart_port *tup, int count)
> +{
> + int copied;
> +
> + tup->uport.icount.rx += count;
> + dma_sync_single_for_cpu(tup->uport.dev, tup->rx_dma_buf_phys,
> + TEGRA_UART_RX_DMA_BUFFER_SIZE, DMA_FROM_DEVICE);
> + copied = tty_insert_flip_string(tup->uport.state->port.tty,
Reference needed and port.tty can go to NULL
(good rule of thumb - any use of port.tty directly is probably wrong)
> + tty_flip_buffer_push(u->state->port.tty);
Ditto (and elsewhere)
> + if ((c_cflag & PARENB) == PARENB) {
> + symb_bit++;
> + if ((c_cflag & CMSPAR) == CMSPAR) {
> + dev_err(tup->uport.dev, "Space parity not supported\n");
> + return;
No - this is out of spec and lets user tasks spam the log. Just clear the
flag if not supported.
> + /* Baud rate. */
> + baud = uart_get_baud_rate(u, termios, oldtermios, 200, 4000000);
> + spin_unlock_irqrestore(&u->lock, flags);
> + tegra_set_baudrate(tup, baud);
> + spin_lock_irqsave(&u->lock, flags);
I think you need to use the helpers to put the actual baud it got into the
termios if not B0 - see 8250.c ?
Alan
next prev parent reply other threads:[~2012-12-17 18:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 12:10 [PATCH] serial: tegra: add serial driver Laxman Dewangan
2012-12-17 15:13 ` Greg KH
2012-12-17 15:24 ` Rob Herring
2012-12-17 21:30 ` Stephen Warren
2012-12-17 17:10 ` Grant Likely
2012-12-17 21:31 ` Stephen Warren
2012-12-19 13:01 ` Grant Likely
2012-12-19 14:15 ` Laxman Dewangan
2012-12-19 16:58 ` Stephen Warren
2012-12-20 1:09 ` Grant Likely
2012-12-17 18:23 ` Alan Cox [this message]
2012-12-17 21:36 ` Stephen Warren
2012-12-17 21:58 ` Mitch Bradley
2012-12-17 22:04 ` Stephen Warren
2012-12-17 22:17 ` Mitch Bradley
2012-12-19 13:03 ` Grant Likely
2012-12-17 21:55 ` Stephen Warren
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=20121217182343.37324522@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=alan@linux.intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=ldewangan@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=swarren@wwwdotorg.org \
/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;
as well as URLs for NNTP newsgroup(s).