diff options
author | Marc Zyngier <maz@misterjones.org> | 2006-08-23 18:50:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-08-23 18:50:57 -0400 |
commit | 0f4184f73d5233214d3225a94fcf1bd4d6678d74 (patch) | |
tree | 0aca57fc40523377916f0836506646205a0677eb | |
parent | 25848c4e502ec2bb94ee1f3c82709311059d0857 (diff) |
[SERIAL] sunsab: Fix E250 console with RSC.
This fixes yet another sunsab problem, when console is set to anything
but the first port. The console framework calls sunsab_console_setup
for each port, and we end up setting up a console on a not yet
discovered port, which leads to an Oops. Instead, defer console setup
until the requested port is properly initialized. Tested on an E250
through an RSC console.
Reported by Daniel Smolik <marvin@mydatex.cz>
Signed-off-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/serial/sunsab.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index dc673e1b6fd9..cfe20f730436 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -886,6 +886,15 @@ static int sunsab_console_setup(struct console *con, char *options) | |||
886 | unsigned long flags; | 886 | unsigned long flags; |
887 | unsigned int baud, quot; | 887 | unsigned int baud, quot; |
888 | 888 | ||
889 | /* | ||
890 | * The console framework calls us for each and every port | ||
891 | * registered. Defer the console setup until the requested | ||
892 | * port has been properly discovered. A bit of a hack, | ||
893 | * though... | ||
894 | */ | ||
895 | if (up->port.type != PORT_SUNSAB) | ||
896 | return -1; | ||
897 | |||
889 | printk("Console: ttyS%d (SAB82532)\n", | 898 | printk("Console: ttyS%d (SAB82532)\n", |
890 | (sunsab_reg.minor - 64) + con->index); | 899 | (sunsab_reg.minor - 64) + con->index); |
891 | 900 | ||