linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Don't shutdown TX on mpc5200 serial port if it is a console
@ 2007-04-19 19:42 Grant Likely
  2007-04-20 13:28 ` Bartlomiej Sieka
  0 siblings, 1 reply; 2+ messages in thread
From: Grant Likely @ 2007-04-19 19:42 UTC (permalink / raw)
  To: linuxppc-dev, linux-serial, Sylvain Munaut, Wolfgang Denk,
	Bartlomiej Sieka

If the serial port gets shut down, then console output stalls.  9 out
of 10 kernel hackers agree, this is a bad thing.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

Wolfgang, please verify this new patch.  Sylvain rightly pointed out that
RX and interrupts should be turned off regardless.  If it works for you,
please reply with a Signed-of-by line.

Thanks,
g.

 drivers/serial/mpc52xx_uart.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index f8c1761..35f8b86 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -257,9 +257,10 @@ mpc52xx_uart_shutdown(struct uart_port *port)
 {
 	struct mpc52xx_psc __iomem *psc = PSC(port);
 
-	/* Shut down the port, interrupt and all */
+	/* Shut down the port.  Leave TX active if on a console port */
 	out_8(&psc->command,MPC52xx_PSC_RST_RX);
-	out_8(&psc->command,MPC52xx_PSC_RST_TX);
+	if (!uart_console(port))
+		out_8(&psc->command,MPC52xx_PSC_RST_TX);
 
 	port->read_status_mask = 0;
 	out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
-- 
1.5.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Don't shutdown TX on mpc5200 serial port if it is a console
  2007-04-19 19:42 [PATCH] Don't shutdown TX on mpc5200 serial port if it is a console Grant Likely
@ 2007-04-20 13:28 ` Bartlomiej Sieka
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Sieka @ 2007-04-20 13:28 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, linux-serial

Grant Likely wrote:
> If the serial port gets shut down, then console output stalls.  9 out
> of 10 kernel hackers agree, this is a bad thing.
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
> Wolfgang, please verify this new patch.  Sylvain rightly pointed out that
> RX and interrupts should be turned off regardless.  If it works for you,
> please reply with a Signed-of-by line.

Patch verified on a MPC5200B-based board.

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>


Regards,
Bartlomiej

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-20 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-19 19:42 [PATCH] Don't shutdown TX on mpc5200 serial port if it is a console Grant Likely
2007-04-20 13:28 ` Bartlomiej Sieka

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).