diff mbox

Serial console issue with 2.6.32

Message ID 20100525.235154.189709335.davem@davemloft.net
State Accepted
Delegated to: David Miller
Headers show

Commit Message

David Miller May 26, 2010, 6:51 a.m. UTC
From: Frans Pop <elendil@planet.nl>
Date: Wed, 17 Mar 2010 11:50:07 +0100

> Now that I know it's not a huge issue for me personally. It just means I 
> can no longer use my Sparc box for testing use of console= for Debian 
> installations, which is a pity as it's the most suitable box I have for 
> that.
> 
> I'm not sure how much this is going to throw off other users, but I suspect 
> the majority (except maybe for long time sparc sysadmins) would expect 
> console= to be honored.

Frans, is this patch enough to get the behavior you want?

--------------------
sunserial: Don't call add_preferred_console() when console= is specified.

Reported-by: Frans Pop <elendil@planet.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/serial/suncore.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

Frans Pop June 2, 2010, 5:53 p.m. UTC | #1
On Wednesday 26 May 2010, David Miller wrote:
> From: Frans Pop <elendil@planet.nl>
> Date: Wed, 17 Mar 2010 11:50:07 +0100
>
> > Now that I know it's not a huge issue for me personally. It just means
> > I can no longer use my Sparc box for testing use of console= for
> > Debian installations, which is a pity as it's the most suitable box I
> > have for that.
> >
> > I'm not sure how much this is going to throw off other users, but I
> > suspect the majority (except maybe for long time sparc sysadmins)
> > would expect console= to be honored.
>
> Frans, is this patch enough to get the behavior you want?
>
> --------------------
> sunserial: Don't call add_preferred_console() when console= is
> specified.

Thanks for the patch David. I've tried to test with it, but for some reason 
the box does not boot at all with .34 (both with and without the patch) if 
I pass console=ttyS0. If I don't pass the parameter it boots fine.

Need to investigate (using netconsole or earlier kernels), but that will 
take some more time.

Cheers,
FJP
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Aug. 15, 2010, 6:36 a.m. UTC | #2
From: Frans Pop <elendil@planet.nl>
Date: Wed, 2 Jun 2010 19:53:34 +0200

> On Wednesday 26 May 2010, David Miller wrote:
>> From: Frans Pop <elendil@planet.nl>
>> Date: Wed, 17 Mar 2010 11:50:07 +0100
>>
>> > Now that I know it's not a huge issue for me personally. It just means
>> > I can no longer use my Sparc box for testing use of console= for
>> > Debian installations, which is a pity as it's the most suitable box I
>> > have for that.
>> >
>> > I'm not sure how much this is going to throw off other users, but I
>> > suspect the majority (except maybe for long time sparc sysadmins)
>> > would expect console= to be honored.
>>
>> Frans, is this patch enough to get the behavior you want?
>>
>> --------------------
>> sunserial: Don't call add_preferred_console() when console= is
>> specified.
> 
> Thanks for the patch David. I've tried to test with it, but for some reason 
> the box does not boot at all with .34 (both with and without the patch) if 
> I pass console=ttyS0. If I don't pass the parameter it boots fine.
> 
> Need to investigate (using netconsole or earlier kernels), but that will 
> take some more time.

Frans, I just wanted to let you know that I'm actively trying to debug this
now.  On my SunBlade100 I can see similar behavior.  If I hook up a video
head and a keyboard, yet give "console=ttyS0" on the command line it doesn't
try to use the serial console for kernel messages.

I'll let you know when I have a fix to test.

Thanks for your patience.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c
index ed7d958..544f2e2 100644
--- a/drivers/serial/suncore.c
+++ b/drivers/serial/suncore.c
@@ -71,7 +71,9 @@  int sunserial_console_match(struct console *con, struct device_node *dp,
 
 	con->index = line;
 	drv->cons = con;
-	add_preferred_console(con->name, line, NULL);
+
+	if (!console_set_on_cmdline)
+		add_preferred_console(con->name, line, NULL);
 
 	return 1;
 }