All of lore.kernel.org
 help / color / mirror / Atom feed
* circular console list in 2.6.9-bk3+
@ 2004-11-18 14:41 William Lee Irwin III
  2004-11-18 22:36 ` David S. Miller
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: William Lee Irwin III @ 2004-11-18 14:41 UTC (permalink / raw)
  To: sparclinux

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

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

* Re: circular console list in 2.6.9-bk3+
  2004-11-18 14:41 circular console list in 2.6.9-bk3+ William Lee Irwin III
@ 2004-11-18 22:36 ` David S. Miller
  2004-11-19  0:59 ` William Lee Irwin III
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2004-11-18 22:36 UTC (permalink / raw)
  To: sparclinux

On Thu, 18 Nov 2004 06:41:42 -0800
William Lee Irwin III <wli@holomorphy.com> wrote:

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

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.

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

* Re: circular console list in 2.6.9-bk3+
  2004-11-18 14:41 circular console list in 2.6.9-bk3+ William Lee Irwin III
  2004-11-18 22:36 ` David S. Miller
@ 2004-11-19  0:59 ` William Lee Irwin III
  2004-11-19  1:06 ` William Lee Irwin III
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: William Lee Irwin III @ 2004-11-19  0:59 UTC (permalink / raw)
  To: sparclinux

On Thu, 18 Nov 2004 06:41:42 -0800 William Lee Irwin III <wli@holomorphy.com> wrote:
>> 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.

On Thu, Nov 18, 2004 at 02:36:53PM -0800, David S. Miller wrote:
> 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.

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, rmk@flint.arm.linux.org.uk

	[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(+)


diff -Nru a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
--- a/drivers/serial/serial_core.c	2004-10-19 20:33:48 -07:00
+++ b/drivers/serial/serial_core.c	2004-10-19 20:33:48 -07:00
@@ -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);
 

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

* Re: circular console list in 2.6.9-bk3+
  2004-11-18 14:41 circular console list in 2.6.9-bk3+ William Lee Irwin III
  2004-11-18 22:36 ` David S. Miller
  2004-11-19  0:59 ` William Lee Irwin III
@ 2004-11-19  1:06 ` William Lee Irwin III
  2004-11-19  3:00 ` David S. Miller
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: William Lee Irwin III @ 2004-11-19  1:06 UTC (permalink / raw)
  To: sparclinux

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

On Thu, Nov 18, 2004 at 04:59:47PM -0800, William Lee Irwin III wrote:
> 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

[-- Attachment #2: e3k.log.162.gz --]
[-- Type: application/octet-stream, Size: 21409 bytes --]

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

* Re: circular console list in 2.6.9-bk3+
  2004-11-18 14:41 circular console list in 2.6.9-bk3+ William Lee Irwin III
                   ` (2 preceding siblings ...)
  2004-11-19  1:06 ` William Lee Irwin III
@ 2004-11-19  3:00 ` David S. Miller
  2004-11-20 10:04 ` William Lee Irwin III
  2004-11-20 20:06 ` David S. Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2004-11-19  3:00 UTC (permalink / raw)
  To: sparclinux


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;
 }

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

* Re: circular console list in 2.6.9-bk3+
  2004-11-18 14:41 circular console list in 2.6.9-bk3+ William Lee Irwin III
                   ` (3 preceding siblings ...)
  2004-11-19  3:00 ` David S. Miller
@ 2004-11-20 10:04 ` William Lee Irwin III
  2004-11-20 20:06 ` David S. Miller
  5 siblings, 0 replies; 7+ messages in thread
From: William Lee Irwin III @ 2004-11-20 10:04 UTC (permalink / raw)
  To: sparclinux

On Thu, Nov 18, 2004 at 07:00:07PM -0800, David S. Miller wrote:
> 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

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

* Re: circular console list in 2.6.9-bk3+
  2004-11-18 14:41 circular console list in 2.6.9-bk3+ William Lee Irwin III
                   ` (4 preceding siblings ...)
  2004-11-20 10:04 ` William Lee Irwin III
@ 2004-11-20 20:06 ` David S. Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2004-11-20 20:06 UTC (permalink / raw)
  To: sparclinux

On Sat, 20 Nov 2004 02:04:03 -0800
William Lee Irwin III <wli@holomorphy.com> wrote:

> On Thu, Nov 18, 2004 at 07:00:07PM -0800, David S. Miller wrote:
> > 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.

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

end of thread, other threads:[~2004-11-20 20:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-18 14:41 circular console list in 2.6.9-bk3+ William Lee Irwin III
2004-11-18 22:36 ` David S. Miller
2004-11-19  0:59 ` William Lee Irwin III
2004-11-19  1:06 ` William Lee Irwin III
2004-11-19  3:00 ` David S. Miller
2004-11-20 10:04 ` William Lee Irwin III
2004-11-20 20:06 ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.