mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Graf Yang <graf.yang@analog.com>,
	Mike Frysinger <vapier@gentoo.org>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 03/11] serial: bfin_5xx: IRDA is not affected by anomaly 05000230
Date: Fri,  4 Jun 2010 13:47:49 -0700	[thread overview]
Message-ID: <1275684477-20172-3-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20100604204445.GB19761@kroah.com>

From: Graf Yang <graf.yang@analog.com>

Anomaly 05000230 (over sampling of the UART STOP bit) applies only when
the peripheral is operating in UART mode.  So drop the anomaly handling
when the UART is in IRDA mode.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/bfin_5xx.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 96f7e74..a78652b 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	}
 
 	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-	quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
+	quot = uart_get_divisor(port, baud);
+
+	/* If discipline is not IRDA, apply ANOMALY_05000230 */
+	if (termios->c_line != N_IRDA)
+		quot -= ANOMALY_05000230;
+
 	spin_lock_irqsave(&uart->port.lock, flags);
 
 	UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
-- 
1.7.1


  parent reply	other threads:[~2010-06-04 20:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-04 20:44 [GIT PATCH] TTY and serial fixes for .35-git Greg KH
2010-06-04 20:47 ` [PATCH 01/11] msm_serial: fix serial on trout Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 02/11] serial_cs: add and sort IDs for serial and modem cards Greg Kroah-Hartman
2010-06-04 20:47 ` Greg Kroah-Hartman [this message]
2010-06-04 20:47 ` [PATCH 04/11] serial: bfin_5xx: fix typo in IER check Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 05/11] TTY/n_gsm: potential double lock Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 06/11] altera_uart: Don't take spinlock in already protected functions Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 07/11] altera_uart: Simplify altera_uart_console_putc Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 08/11] tty: fix a little bug in scrup, vt.c Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 09/11] serial: altera_uart: Proper section for altera_uart_remove Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 10/11] vt_ioctl: return -EFAULT on copy_from_user errors Greg Kroah-Hartman
2010-06-04 20:47 ` [PATCH 11/11] serial: add support for various Titan PCI cards Greg Kroah-Hartman

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=1275684477-20172-3-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=graf.yang@analog.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vapier@gentoo.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

Powered by JetHome