public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Garbage on serial console after serial driver loads
@ 2005-03-25 20:24 Luca
  2005-03-25 20:38 ` Russell King
  0 siblings, 1 reply; 23+ messages in thread
From: Luca @ 2005-03-25 20:24 UTC (permalink / raw)
  To: Linux Serial; +Cc: linux-kernel

Hi,
I attached a null modem cable to my notebook and I'm seeing garbage as
soon as the serial driver is loaded. I tried booting with init=/bin/bash
to be sure that it's not some rc script doing strange things to the
serial port, but this didn't solve the problem.

This is the relevant part of .config:

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_CS is not set
# CONFIG_SERIAL_8250_ACPI is not set
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set


I also tried with ACPI discovery (just in case) without success:

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_CS is not set
CONFIG_SERIAL_8250_ACPI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
CONFIG_SERIAL_8250_DETECT_IRQ=y
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_RSA is not set

This is kernel command line:

Kernel command line: BOOT_IMAGE=linux-2.6.12rc1 ro root=305 video=sisfb:mode:1024x768x16 console=tty0 console=ttyS0,38400n8 init=/bin/bash

And this is where garbage appears:

PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
i8042.c: Detected active multiplexing controller, rev 1.1.
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
[garbage]

Once I get the shell using 'clear' cures the problem. The log (from
dmesg) should be:

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a NS16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a NS16550A
ttyS0 at I/O 0x3f8 (irq = 4) is a NS16550A

This is the first time that I use serial console with the notebook, but
I've done this before with other machines and never saw this problem.

Googling aroung I found another user with the same problem:
http://www.ussg.iu.edu/hypermail/linux/kernel/0503.1/0442.html
but no answer :(

Any suggestion?

Luca
-- 
Home: http://kronoz.cjb.net
Un apostolo vedendo Gesu` camminare sulle acque:
- Cazzo se e` buono 'sto fumo!!!

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: Garbage on serial console after serial driver loads
@ 2005-03-27 11:11 Jan Engelhardt
  0 siblings, 0 replies; 23+ messages in thread
From: Jan Engelhardt @ 2005-03-27 11:11 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,


I have come across a 16550A myself (in VMware) and so, tested it.
Linux reports it as a "16550A" while OpenBSD says it's a "NS16550A" --
output to this serial console (vmware: file) works fine, though.

My real box's serial is also a 16550A but havenot tested that- got no cable.


Jan Engelhardt
-- 
No TOFU for me, please.

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: Garbage on serial console after serial driver loads
@ 2005-03-28 17:36 Phil Oester
  2005-03-28 19:02 ` Russell King
  0 siblings, 1 reply; 23+ messages in thread
From: Phil Oester @ 2005-03-28 17:36 UTC (permalink / raw)
  To: linux-kernel

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

On Sat, Mar 26, 2005 at 03:10:05PM +0000, Russell King wrote:
> Doesn't matter. The problem is that dwmw2's NS16550A patch (from ages
> ago) changes the prescaler setting for this device so we can use the
> higher speed baud rates. This means any programmed divisor (programmed
> at early serial console initialisation time) suddenly becomes wrong as
> soon as we fiddle with the prescaler during normal UART initialisation
> time.

Seems like you are correct, given the below patch fixes the garbage
output for me.

Phil



[-- Attachment #2: patch-serial --]
[-- Type: text/plain, Size: 431 bytes --]

--- linux-standard/drivers/serial/8250.c	2005-03-02 02:37:47.000000000 -0500
+++ linux-dellfw/drivers/serial/8250.c	2005-03-28 12:28:34.560032856 -0500
@@ -698,7 +698,7 @@
 		serial_outp(up, UART_MCR, status1);
 
 		if ((status2 ^ status1) & UART_MCR_LOOP) {
-#ifndef CONFIG_PPC
+#if 0
 			serial_outp(up, UART_LCR, 0xE0);
 			status1 = serial_in(up, 0x04); /* EXCR1 */
 			status1 &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */

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

end of thread, other threads:[~2005-05-03 16:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-25 20:24 Garbage on serial console after serial driver loads Luca
2005-03-25 20:38 ` Russell King
2005-03-25 21:01   ` Luca
2005-03-26 10:16     ` Jan Engelhardt
2005-03-26 14:35       ` Luca
2005-03-26 15:10       ` Russell King
2005-03-26 15:55         ` Phil Oester
2005-03-26 16:37           ` Russell King
2005-03-26 17:19             ` Phil Oester
2005-03-26 17:22             ` Phil Oester
2005-04-13 12:45           ` Paul Slootman
2005-04-18 20:21             ` Phil Oester
2005-04-18 23:14             ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2005-03-27 11:11 Jan Engelhardt
2005-03-28 17:36 Phil Oester
2005-03-28 19:02 ` Russell King
2005-03-28 23:57   ` Dave Airlie
2005-05-03 14:17   ` David Woodhouse
2005-05-03 15:04     ` Phil Oester
2005-05-03 15:11     ` Tom Rini
2005-05-03 15:23       ` David Woodhouse
2005-05-03 16:00         ` Tom Rini
2005-05-03 16:16       ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox