[PATCH] Fix legacy serial search for opb bus ports

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE6753d

5 messages, 4 authors, 2008-02-07 · open the first message on its own page

[PATCH] Fix legacy serial search for opb bus ports

From: Michael Ellerman <hidden>
Date: 2008-02-05 12:01:50

The patch to legacy_serial.c (1a7507c7da2df6856e085e0fbb0c9ea8c12ac4e,
Reduce code duplication in legacy_serial, add UART parent types) changed
the semantics for opb ports from type = "opb" || compatible = "ibm,opb"
to type = "opb" && compatible = "ibm,opb".

The result is serial ports on our QS21s (Cell blades) don't get found,
and for some reason the machine doesn't boot at all - possibly it's
panicking due to lack of a console?

The fix is to add two entries to the of_device_id table, one that looks
for type = "opb" and the other compatible = "ibm,opb".

Signed-off-by: Michael Ellerman <redacted>
---
 arch/powerpc/kernel/legacy_serial.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 76b862b..61dd174 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -36,7 +36,8 @@ static struct legacy_serial_info {
 static struct __initdata of_device_id parents[] = {
 	{.type = "soc",},
 	{.type = "tsi-bridge",},
-	{.type = "opb", .compatible = "ibm,opb",},
+	{.type = "opb", },
+	{.compatible = "ibm,opb",},
 	{.compatible = "simple-bus",},
 	{.compatible = "wrs,epld-localbus",},
 };
-- 
1.5.2.rc1.1884.g59b20

Re: [PATCH] Fix legacy serial search for opb bus ports

From: Paul Gortmaker <hidden>
Date: 2008-02-05 14:50:10

In message: [PATCH] Fix legacy serial search for opb bus ports
on 05/02/2008 Michael Ellerman wrote:
The patch to legacy_serial.c (1a7507c7da2df6856e085e0fbb0c9ea8c12ac4e,
Reduce code duplication in legacy_serial, add UART parent types) changed
the semantics for opb ports from type = "opb" || compatible = "ibm,opb"
to type = "opb" && compatible = "ibm,opb".
Ah.  I'd originally coded it as an ||   -- but then Arnd suggested I
condense it further by using of_match_node() -- which was a good idea,
but that is where it accidentally changed to && without me catching it.
Thanks for finding this, and sorry for the debug adventure (I know
vanishing uarts isn't fun).

Paul.

Acked-by: Paul Gortmaker <redacted>
quoted hunk
The result is serial ports on our QS21s (Cell blades) don't get found,
and for some reason the machine doesn't boot at all - possibly it's
panicking due to lack of a console?

The fix is to add two entries to the of_device_id table, one that looks
for type = "opb" and the other compatible = "ibm,opb".

Signed-off-by: Michael Ellerman <redacted>
---
 arch/powerpc/kernel/legacy_serial.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 76b862b..61dd174 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -36,7 +36,8 @@ static struct legacy_serial_info {
 static struct __initdata of_device_id parents[] = {
 	{.type = "soc",},
 	{.type = "tsi-bridge",},
-	{.type = "opb", .compatible = "ibm,opb",},
+	{.type = "opb", },
+	{.compatible = "ibm,opb",},
 	{.compatible = "simple-bus",},
 	{.compatible = "wrs,epld-localbus",},
 };
-- 
1.5.2.rc1.1884.g59b20

Re: [PATCH] Fix legacy serial search for opb bus ports

From: Michael Ellerman <hidden>
Date: 2008-02-05 23:50:09

On Tue, 2008-02-05 at 09:50 -0500, Paul Gortmaker wrote:
In message: [PATCH] Fix legacy serial search for opb bus ports
on 05/02/2008 Michael Ellerman wrote:
quoted
The patch to legacy_serial.c (1a7507c7da2df6856e085e0fbb0c9ea8c12ac4e,
Reduce code duplication in legacy_serial, add UART parent types) changed
the semantics for opb ports from type = "opb" || compatible = "ibm,opb"
to type = "opb" && compatible = "ibm,opb".
Ah.  I'd originally coded it as an ||   -- but then Arnd suggested I
condense it further by using of_match_node() -- which was a good idea,
but that is where it accidentally changed to && without me catching it.
Thanks for finding this, and sorry for the debug adventure (I know
vanishing uarts isn't fun).
Yeah it's easy to confuse, I had to look at of_match_node() fairly
closely before I was convinced it was equivalent to &&. The bisect was
fairly painless actually, so no dramas.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Re: [PATCH] Fix legacy serial search for opb bus ports

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-02-06 00:09:14

On Tue, 2008-02-05 at 23:01 +1100, Michael Ellerman wrote:
The patch to legacy_serial.c (1a7507c7da2df6856e085e0fbb0c9ea8c12ac4e,
Reduce code duplication in legacy_serial, add UART parent types) changed
the semantics for opb ports from type = "opb" || compatible = "ibm,opb"
to type = "opb" && compatible = "ibm,opb".

The result is serial ports on our QS21s (Cell blades) don't get found,
and for some reason the machine doesn't boot at all - possibly it's
panicking due to lack of a console?

The fix is to add two entries to the of_device_id table, one that looks
for type = "opb" and the other compatible = "ibm,opb".

Signed-off-by: Michael Ellerman <redacted>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
quoted hunk
---
 arch/powerpc/kernel/legacy_serial.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 76b862b..61dd174 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -36,7 +36,8 @@ static struct legacy_serial_info {
 static struct __initdata of_device_id parents[] = {
 	{.type = "soc",},
 	{.type = "tsi-bridge",},
-	{.type = "opb", .compatible = "ibm,opb",},
+	{.type = "opb", },
+	{.compatible = "ibm,opb",},
 	{.compatible = "simple-bus",},
 	{.compatible = "wrs,epld-localbus",},
 };

Re: [PATCH] Fix legacy serial search for opb bus ports

From: Arnd Bergmann <arnd@arndb.de>
Date: 2008-02-07 02:51:46

On Tuesday 05 February 2008, Michael Ellerman wrote:
The fix is to add two entries to the of_device_id table, one that looks
for type = "opb" and the other compatible = "ibm,opb".

Signed-off-by: Michael Ellerman <redacted>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help