linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Bordug <vbordug@ru.mvista.com>
To: kalle.pokki@iki.fi
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] CPM_UART: Fix non-console transmit
Date: Thu, 19 Oct 2006 23:28:03 +0400	[thread overview]
Message-ID: <20061019232803.6f28ca85@localhost.localdomain> (raw)
In-Reply-To: <Pine.OSF.4.61.0610191519020.318096@kosh.hut.fi>

[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]

On Thu, 19 Oct 2006 15:25:55 +0300 (EEST)
kalle.pokki@iki.fi wrote:

> The SMC and SCC hardware transmitter is enabled at the wrong
> place. Simply writing twice to the non-console port, like
> 
> $ echo asdf > /dev/ttyCPM1
> $ echo asdf > /dev/ttyCPM1
> 
> puts the shell into endless uninterruptible sleep, since the
> transmitter is stopped after the first write, and is not enabled
> before the shutdown function of the second write. Thus the transmit
> buffers are never emptied.
> 
Was about to Ack, but... need one more glance at it on hw. 
I recall something that might be reason of the current implementation,
but had no chance to recover the details.

Thanks for the input. I'll follow-up tomorrow.

> Signed-off-by: Kalle Pokki <kalle.pokki@iki.fi>
> ---
>   drivers/serial/cpm_uart/cpm_uart_core.c |    5 ++---
>   1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c
> b/drivers/serial/cpm_uart/cpm_uart_core.c index 90ff96e..8f3b3e5
> 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c
> +++ b/drivers/serial/cpm_uart/cpm_uart_core.c
> @@ -194,10 +194,8 @@ static void cpm_uart_start_tx(struct uar
>   	if (cpm_uart_tx_pump(port) != 0) {
>   		if (IS_SMC(pinfo)) {
>   			smcp->smc_smcm |= SMCM_TX;
> -			smcp->smc_smcmr |= SMCMR_TEN;
>   		} else {
>   			sccp->scc_sccm |= UART_SCCM_TX;
> -			pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT;
>   		}
>   	}
>   }
> @@ -420,9 +418,10 @@ static int cpm_uart_startup(struct uart_
>   	/* Startup rx-int */
>   	if (IS_SMC(pinfo)) {
>   		pinfo->smcp->smc_smcm |= SMCM_RX;
> -		pinfo->smcp->smc_smcmr |= SMCMR_REN;
> +		pinfo->smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN);
>   	} else {
>   		pinfo->sccp->scc_sccm |= UART_SCCM_RX;
> +		pinfo->sccp->scc_gsmrl |= (SCC_GSMRL_ENR |
> SCC_GSMRL_ENT); }
> 
>   	if (!(pinfo->flags & FLAG_CONSOLE))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-10-19 19:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19 12:25 [PATCH] CPM_UART: Fix non-console transmit kalle.pokki
2006-10-19 19:28 ` Vitaly Bordug [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-19 12:52 Kalle Pokki
2006-10-31 15:08 ` Vitaly Bordug
2006-11-01  3:35   ` Paul Mackerras
2006-11-01  7:52     ` Kalle Pokki
2006-10-19 16:05 Boris Shteinbock
2006-10-19 19:07 ` Kalle Pokki
2006-10-31 10:24   ` Laurent Pinchart
2006-10-31 11:52     ` Kalle Pokki

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=20061019232803.6f28ca85@localhost.localdomain \
    --to=vbordug@ru.mvista.com \
    --cc=kalle.pokki@iki.fi \
    --cc=linuxppc-embedded@ozlabs.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).