* [PATCH] of_serial: ignore unknown serial port
@ 2007-05-31 9:30 Ishizaki Kou
2007-05-31 10:46 ` Arnd Bergmann
2007-06-06 5:58 ` Paul Mackerras
0 siblings, 2 replies; 7+ messages in thread
From: Ishizaki Kou @ 2007-05-31 9:30 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, arnd
Current of_serial driver assumes unknown serial port to be 8250. But
this behavior may cause fatal problems when the serial port is not
8250. This patch corrects probe routine to ignore unknown serial port.
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Cc: Arnd Bergmann <arnd@arndb.de>
---
Index: linux-powerpc-git/drivers/serial/of_serial.c
===================================================================
--- linux-powerpc-git.orig/drivers/serial/of_serial.c
+++ linux-powerpc-git/drivers/serial/of_serial.c
@@ -75,15 +75,13 @@ static int __devinit of_platform_serial_
goto out;
switch (port_type) {
- case PORT_UNKNOWN:
- dev_info(&ofdev->dev, "Unknown serial port found, "
- "attempting to use 8250 driver\n");
- /* fallthrough */
case PORT_8250 ... PORT_MAX_8250:
ret = serial8250_register_port(&port);
break;
default:
/* need to add code for these */
+ case PORT_UNKNOWN:
+ dev_info(&ofdev->dev, "Unknown serial port found, ignored\n");
ret = -ENODEV;
break;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of_serial: ignore unknown serial port
2007-05-31 9:30 [PATCH] of_serial: ignore unknown serial port Ishizaki Kou
@ 2007-05-31 10:46 ` Arnd Bergmann
2007-06-06 5:58 ` Paul Mackerras
1 sibling, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2007-05-31 10:46 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
On Thursday 31 May 2007, Ishizaki Kou wrote:
> Current of_serial driver assumes unknown serial port to be 8250. But
> this behavior may cause fatal problems when the serial port is not
> 8250. This patch corrects probe routine to ignore unknown serial port.
>
> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of_serial: ignore unknown serial port
2007-05-31 9:30 [PATCH] of_serial: ignore unknown serial port Ishizaki Kou
2007-05-31 10:46 ` Arnd Bergmann
@ 2007-06-06 5:58 ` Paul Mackerras
2007-06-06 9:09 ` Segher Boessenkool
2007-06-06 9:28 ` kouish
1 sibling, 2 replies; 7+ messages in thread
From: Paul Mackerras @ 2007-06-06 5:58 UTC (permalink / raw)
To: Ishizaki Kou; +Cc: linuxppc-dev, arnd
Ishizaki Kou writes:
> Current of_serial driver assumes unknown serial port to be 8250. But
> this behavior may cause fatal problems when the serial port is not
> 8250. This patch corrects probe routine to ignore unknown serial port.
>
> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> Cc: Arnd Bergmann <arnd@arndb.de>
Is this a bugfix that needs to go in 2.6.22? Likewise, is your next
patch (of_serial: add port type checking) needed in 2.6.22?
Paul.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of_serial: ignore unknown serial port
2007-06-06 5:58 ` Paul Mackerras
@ 2007-06-06 9:09 ` Segher Boessenkool
2007-06-06 13:01 ` Arnd Bergmann
2007-06-06 9:28 ` kouish
1 sibling, 1 reply; 7+ messages in thread
From: Segher Boessenkool @ 2007-06-06 9:09 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, arnd
>> Current of_serial driver assumes unknown serial port to be 8250. But
>> this behavior may cause fatal problems when the serial port is not
>> 8250. This patch corrects probe routine to ignore unknown serial port.
>>
>> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>
> Is this a bugfix that needs to go in 2.6.22?
This potentially breaks lots of other platforms, so no
please, put it in early in the next cycle and give those
others time to recover from this change.
Segher
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] of_serial: ignore unknown serial port
2007-06-06 5:58 ` Paul Mackerras
2007-06-06 9:09 ` Segher Boessenkool
@ 2007-06-06 9:28 ` kouish
1 sibling, 0 replies; 7+ messages in thread
From: kouish @ 2007-06-06 9:28 UTC (permalink / raw)
To: 'Paul Mackerras'; +Cc: linuxppc-dev, segher, arnd
> Ishizaki Kou writes:
>
> > Current of_serial driver assumes unknown serial port to be 8250. But
> > this behavior may cause fatal problems when the serial port is not
> > 8250. This patch corrects probe routine to ignore unknown
> serial port.
> >
> > Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> > Cc: Arnd Bergmann <arnd@arndb.de>
>
> Is this a bugfix that needs to go in 2.6.22? Likewise, is your next
> patch (of_serial: add port type checking) needed in 2.6.22?
>
> Paul.
Paul-san,
Thank you to ask me about our patches to of_serial driver.
We need the 'ignore unknown serial port' patch in 2.6.22 because
assuming an unknown port as 8250 may cause fatal problems on Celleb
with our new device tree which has 'serial' type device nodes. These
serial ports are not 8250.
On the other hand, we have no problem even if the 'of_serial: add port
type checking' patch will be merged in 2.6.23.
Best regards,
Kou Ishizaki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of_serial: ignore unknown serial port
2007-06-06 9:09 ` Segher Boessenkool
@ 2007-06-06 13:01 ` Arnd Bergmann
2007-06-06 13:44 ` Segher Boessenkool
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2007-06-06 13:01 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Paul Mackerras
On Wednesday 06 June 2007, Segher Boessenkool wrote:
> >
> > Is this a bugfix that needs to go in 2.6.22?
>
> This potentially breaks lots of other platforms, so no
> please, put it in early in the next cycle and give those
> others time to recover from this change.
I would expect that the bugfix is relatively harmless, as the
driver is rather new and there can only be a very small set
of users. All the OF based systems should be working fine
either way, because they already have legacy_serial, and
the dtc sources that come with the kernel all list the
serial ports as compatible to either "ns16550", "cpm_uart",
"marvell,mpsc", or "mpc5200-psc-uart". In the first case
of those four, the change is harmless, for the other three
it is a valid bug fix.
It probably only makes a difference for 52xx in the case that
you have CONFIG_SERIAL_OF_PLATFORM=y and CONFIG_SERIAL_MPC52xx=m.
In that configuration, you get the same bug that Kou Ishizaki
observed on celleb without this fix.
Arnd <><
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of_serial: ignore unknown serial port
2007-06-06 13:01 ` Arnd Bergmann
@ 2007-06-06 13:44 ` Segher Boessenkool
0 siblings, 0 replies; 7+ messages in thread
From: Segher Boessenkool @ 2007-06-06 13:44 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, Paul Mackerras
>>> Is this a bugfix that needs to go in 2.6.22?
>>
>> This potentially breaks lots of other platforms, so no
>> please, put it in early in the next cycle and give those
>> others time to recover from this change.
>
> I would expect that the bugfix is relatively harmless,
Sure, but you cannot prove that without checking all possibly
affected systems' device trees, that's my whole point. If
you need a fix for .22 you can always put a conditional on
celleb around the offending code. Anyway, Paul's choice.
Segher
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-06-06 13:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-31 9:30 [PATCH] of_serial: ignore unknown serial port Ishizaki Kou
2007-05-31 10:46 ` Arnd Bergmann
2007-06-06 5:58 ` Paul Mackerras
2007-06-06 9:09 ` Segher Boessenkool
2007-06-06 13:01 ` Arnd Bergmann
2007-06-06 13:44 ` Segher Boessenkool
2007-06-06 9:28 ` kouish
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).