public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 8250: make probing for TXEN bug a config option
Date: Tue, 13 Feb 2007 22:46:43 -0800	[thread overview]
Message-ID: <20070213224643.14d27cd3.akpm@linux-foundation.org> (raw)
In-Reply-To: <20061226194317.3fd3ec14.vitalywool@gmail.com>

On Tue, 26 Dec 2006 19:43:17 +0300 Vitaly Wool <vitalywool@gmail.com> wrote:

        ^^^^^^^^^^^  Sorry.

> Hello Andrew,
> 
> probing for UART_BUG_TXEN in 8250 driver leads to weird effects on some ARM boards (pnx4008 for instance). That is, the driver detects  UART_BUG_TXEN (though it apparently shouldn't) and it leads to symbol loss in console on input (i. e. you input 'a' and you get nothing, then you input 'b' and you get 'a', then you input 'c' and get 'b' and so on).
> 
> The patch below makes this very probing a configuration option turned on by default.
> 
>  drivers/serial/8250.c  |    5 ++++-
>  drivers/serial/Kconfig |   10 ++++++++++
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
> 
> diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
> index 51f3c73..cf3eb31 100644
> --- a/drivers/serial/8250.c
> +++ b/drivers/serial/8250.c
> @@ -1645,6 +1645,7 @@ static int serial8250_startup(struct uar
>  
>  	serial8250_set_mctrl(&up->port, up->port.mctrl);
>  
> +#ifndef CONFIG_SERIAL_8250_DONT_TEST_BUG_TXEN
>  	/*
>  	 * Do a quick test to see if we receive an
>  	 * interrupt when we enable the TX irq.
> @@ -1660,7 +1661,9 @@ static int serial8250_startup(struct uar
>  			pr_debug("ttyS%d - enabling bad tx status workarounds\n",
>  				 port->line);
>  		}
> -	} else {
> +	} else
> +#endif
> +	{
>  		up->bugs &= ~UART_BUG_TXEN;
>  	}
>  
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 2978c09..7efcaf3 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -223,6 +223,16 @@ config SERIAL_8250_DETECT_IRQ
>  
>  	  If unsure, say N.
>  
> +config SERIAL_8250_DONT_TEST_BUG_TXEN
> +	bool "Don't probe for TXEN bug"
> +	depends on SERIAL_8250_EXTENDED
> +	help
> +	  Say Y here if you don't want the kernel to probe for TXEN bug
> +	  on your serial port and try to workaround it. It might lead to
> +	  character loss on some boards, though this is quite a rare case.
> +
> +	  If unsure, say N.
> +
>  config SERIAL_8250_RSA
>  	bool "Support RSA serial ports"
>  	depends on SERIAL_8250_EXTENDED

I think this should be a module option/boot parameter, not a config-time
option.


  reply	other threads:[~2007-02-14  6:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-26 16:43 [PATCH] 8250: make probing for TXEN bug a config option Vitaly Wool
2007-02-14  6:46 ` Andrew Morton [this message]
     [not found]   ` <acd2a5930702140037yff0b77dl2714ea7869bdde54@mail.gmail.com>
2007-02-14  8:47     ` Andrew Morton
2007-02-14 13:41       ` Vitaly Wool
2007-02-14 18:20         ` Andrew Morton
2007-03-14 21:38   ` Vitaly Wool

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=20070213224643.14d27cd3.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vitalywool@gmail.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