circular console list in 2.6.9-bk3+
Some changes that added serial console retry logic aren't interacting well with PROM console setup and teardown and whatever sunzilog.c does, and appear to result in a circular console list (hence indefinitely repeated output). The trick is, of course, that I'm not sure which of the three is wrong.
-- wli
Quoted 5 lines · On Thu, 18 Nov 2004 06:41:42 -0800 William Lee Irwin III <[email protected]>…
Some changes that added serial console retry logic aren't interacting well with PROM console setup and teardown and whatever
sunzilog.cdoes, and appear to result in a circular console list (hence indefinitely repeated output). The trick is, of course, that I'm not sure which of the three is wrong.
Please elaborate.
sunzilog_console_init() will be called at most one time and therefore it will register itself one time via register_console().
I don't see how anything in register_console() can wind us up with a circular list, and thus the problem you seem to be describing.
Quoted 5 lines · On Thu, 18 Nov 2004 06:41:42 -0800 William Lee Irwin III <[email protected]>…
Quoted 5 lines
Some changes that added serial console retry logic aren't interacting well with PROM console setup and teardown and whatever
sunzilog.cdoes, and appear to result in a circular console list (hence indefinitely repeated output). The trick is, of course, that I'm not sure which of the three is wrong.
Quoted 5 lines · David S. Miller
Please elaborate.
sunzilog_console_init()will be called at most one time and therefore it will register itself one time viaregister_console(). I don't see how anything inregister_console()can wind us up with a circular list, and thus the problem you seem to be describing.
We were doing okay until the following patch got merged. Then (booting with -p and console=ttyS0,9600) it loops printk'ing the string
"PROMLIB: Sun IEEE Boot Prom 3.2.30 2002/10/25 14:03"
indefinitely.
-- wli
ChangeSet 1.1988.93.9, 2004/10/19 16:11:22+01:00, [email protected]
[SERIAL] Keep trying to register our console device.
Some serial drivers receive their serial port device information via the device model. This unfortunately means that the selected port may not be available when the console subsystem initialises, so we must keep trying to register the console after each port is added.
serial_core.c | 9 +++++++++ 1 files changed, 9 insertions(+)
drivers/serial/serial_core.c +9 -0
@@ -2225,6 +2225,15 @@*/ tty_register_device (drv->tty_driver, port->line, port->dev); +/* +* If this driver supports console, and it hasn't been +* successfully registered yet, try to re-register it. +* It may be that the port was not available. +*/ +if (port->type !=PORT_UNKNOWN && + port->cons && !(port->cons->flags &CON_ENABLED )) +register_console (port->cons); + out:up (&port_sem);
Quoted 4 lines · William Lee Irwin III
We were doing okay until the following patch got merged. Then (booting with -p and console=ttyS0,9600) it loops printk'ing the string
"PROMLIB: Sun IEEE Boot Prom 3.2.30 2002/10/25 14:03"indefinitely.
Okay, correction:
boot net:dhcp -p root=/dev/nfs nfsroot=/mnt/f/e3k/debian ip=dhcp debug initcall_debug profile=1
Bootlog of 2.6.9-bk3 attached. 2.6.9-bk2 still booted.
-- wli
This should do the trick. Just do the console init before we add the ports.
=== drivers/serial/sunsab.c 1.35 vs edited ==--- 1.35/drivers/serial/sunsab.c 2004-08-26 15:38:22 -07:00
+++ edited/drivers/serial/sunsab.c 2004-11-18 18:49:39 -08:00
@@ -1125,13 +1125,13 @@
sunserial_current_minor += num_channels;
+ sunsab_console_init();
+
for (i = 0; i < num_channels; i++) {
struct uart_sunsab_port *up = &sunsab_ports[i];
uart_add_one_port(&sunsab_reg, &up->port);
}
-
- sunsab_console_init();
return 0;
}
=== drivers/serial/sunsu.c 1.46 vs edited ==--- 1.46/drivers/serial/sunsu.c 2004-10-31 13:33:17 -08:00
+++ edited/drivers/serial/sunsu.c 2004-11-18 18:49:22 -08:00
@@ -1532,6 +1532,7 @@
if (ret < 0)
return ret;
+ sunsu_serial_console_init();
for (i = 0; i < UART_NR; i++) {
struct uart_sunsu_port *up = &sunsu_ports[i];
@@ -1704,7 +1705,6 @@
* Console must be initiated after the generic initialization. */
sunsu_serial_init();
- sunsu_serial_console_init();
return 0;
}
=== drivers/serial/sunzilog.c 1.47 vs edited ==--- 1.47/drivers/serial/sunzilog.c 2004-11-09 16:39:13 -08:00
+++ edited/drivers/serial/sunzilog.c 2004-11-18 18:49:02 -08:00
@@ -1690,6 +1690,7 @@
ret = uart_register_driver(&sunzilog_reg);
if (ret = 0) {
+ sunzilog_console_init();
for (i = 0; i < NUM_CHANNELS; i++) {
struct uart_sunzilog_port *up = &sunzilog_port_table[i];
@@ -1738,7 +1739,6 @@
sunzilog_alloc_tables();
sunzilog_ports_init();
- sunzilog_console_init();
return 0;
}
Quoted 2 lines · David S. Miller
This should do the trick. Just do the console init before we add the ports.
Just to make sure that sure I explicitly said so, this fixes the circular console list issue on my boxen.
-- wli
Quoted 6 lines · On Sat, 20 Nov 2004 02:04:03 -0800 William Lee Irwin III <[email protected]>…
Quoted 2 lines · David S. Miller
This should do the trick. Just do the console init before we add the ports.
Just to make sure that sure I explicitly said so, this fixes the circular console list issue on my boxen.
Great, I'll make sure it gets pushed upstream.