LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Schocher" <hs@denx.de>
To: "Dan Malek" <dan@embeddededge.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] ppc32: Fix SCC Uart write problem after 2. open()
Date: Thu, 3 Nov 2005 19:37:31 +0100	[thread overview]
Message-ID: <AHEILKONAKAEJPHNMOPNOEGDCDAA.hs@denx.de> (raw)
In-Reply-To: <e192e9e7fa764d69dc8e4f4d4391a447@embeddededge.com>

Hello,

On Wed Nov 2 03:08:30 EST 2005 Dan Malek wrote:

>> The following Patch will fix this problem.
> This patch just covers up a driver bug, find and fix the real bug.

i think i found it.

Please have a look at the following patch against current Linux 2.6
tree.

thanks
Heiko Schocher

[PATCH] ppc32: update fix: SCC write after 2nd open().

we never reinitialize the buffer descriptor or the
SCC.

Signed-off-by: Heiko Schocher <hs@denx.de>

---

 drivers/serial/cpm_uart/cpm_uart_core.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c
b/drivers/serial/cpm_uart/cpm_uart_core.c
index 25825f2..e03369c 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -163,7 +163,6 @@ static void cpm_uart_start_tx(struct uar
 			smcp->smc_smcmr |= SMCMR_TEN;
 		} else {
 			sccp->scc_sccm |= UART_SCCM_TX;
-			pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT;
 		}
 	}
 }
@@ -397,7 +396,7 @@ static int cpm_uart_startup(struct uart_
 	}

 	if (!(pinfo->flags & FLAG_CONSOLE))
-		cpm_line_cr_cmd(line,CPM_CR_INIT_TRX);
+		cpm_line_cr_cmd(line,CPM_CR_RESTART_TX);
 	return 0;
 }

@@ -442,9 +441,8 @@ static void cpm_uart_shutdown(struct uar
 			sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
 		}

-		/* Shut them really down and reinit buffer descriptors */
+		/* Shut them really down */
 		cpm_line_cr_cmd(line, CPM_CR_STOP_TX);
-		cpm_uart_initbd(pinfo);
 	}
 }

  reply	other threads:[~2005-11-03 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01  7:17 [PATCH] ppc32: Fix SCC Uart write problem after 2. open() Heiko Schocher
2005-11-01 16:08 ` Dan Malek
2005-11-03 18:37   ` Heiko Schocher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-31 10:53 Heiko Schocher

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=AHEILKONAKAEJPHNMOPNOEGDCDAA.hs@denx.de \
    --to=hs@denx.de \
    --cc=dan@embeddededge.com \
    --cc=linuxppc-dev@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