Fix support for console port other than ttyS0 on mcf.c
Due to a case of backwards logic, mfc.c always makes the console port be ttyS0 even when you ask for another port.
This patch fixes this issue.
Only when the requested port is NOT in the range 0 to MAXPORTS-1 do we force it to be treated as if port 0 was requested. Forcing the port to 0 when it is in fact in the range 0 to MAXPORTS is not helpful.
Tested with working console on ttyS2 on a 5271evb.
drivers/serial/mcf.c +1 -1
@@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options)int parity ='n' ;int flow ='n' ; -if ((co->index >=0 ) && (co->index <=MCF_MAXPORTS )) +if ((co->index <0 ) || (co->index >=MCF_MAXPORTS )) co->index =0 ; port = &mcf_ports[co->index].port;if (port->membase ==0 )
Perhaps CCing [email protected] would be a good idea.
Signature · 1 line
Len Sorensen
Quoted 31 lines · Lennart Sorensen
Due to a case of backwards logic,
mfc.calways makes the console port be ttyS0 even when you ask for another port.This patch fixes this issue.
Only when the requested port is NOT in the range 0 to MAXPORTS-1 do we force it to be treated as if port 0 was requested. Forcing the port to 0 when it is in fact in the range 0 to MAXPORTS is not helpful.
Tested with working console on ttyS2 on a 5271evb.
Signed-off-by Len Sorensen <[email protected]>drivers/serial/mcf.c +1
-2@@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options)int parity ='n' ;int flow ='n' ; -if ((co->index >=0 ) && (co->index <=MCF_MAXPORTS )) +if ((co->index <0 ) || (co->index >=MCF_MAXPORTS )) co->index =0 ; port = &mcf_ports[co->index].port;if (port->membase ==0 ) --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Perhaps CCing [email protected] would be a good idea.
Signature · 1 line
Len Sorensen
Quoted 31 lines · Lennart Sorensen
Due to a case of backwards logic,
mfc.calways makes the console port be ttyS0 even when you ask for another port.This patch fixes this issue.
Only when the requested port is NOT in the range 0 to MAXPORTS-1 do we force it to be treated as if port 0 was requested. Forcing the port to 0 when it is in fact in the range 0 to MAXPORTS is not helpful.
Tested with working console on ttyS2 on a 5271evb.
Signed-off-by Len Sorensen <[email protected]>drivers/serial/mcf.c +1
-2@@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options)int parity ='n' ;int flow ='n' ; -if ((co->index >=0 ) && (co->index <=MCF_MAXPORTS )) +if ((co->index <0 ) || (co->index >=MCF_MAXPORTS )) co->index =0 ; port = &mcf_ports[co->index].port;if (port->membase ==0 ) --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 1 line · Lennart Sorensen
Perhaps CCing [email protected] would be a good idea.
Thanks, but this is a uClinux driver.
Quoted 22 lines · Lennart Sorensen
Quoted 21 lines
Due to a case of backwards logic,
mfc.calways makes the console port be ttyS0 even when you ask for another port.This patch fixes this issue.
Only when the requested port is NOT in the range 0 to MAXPORTS-1 do we force it to be treated as if port 0 was requested. Forcing the port to 0 when it is in fact in the range 0 to MAXPORTS is not helpful.
Tested with working console on ttyS2 on a 5271evb.
Signed-off-by Len Sorensen <[email protected]>drivers/serial/mcf.c +0
-0@@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options)int parity ='n' ;int flow ='n' ;
Quoted 5 lines
drivers/serial/mcf.c static int __init mcf_console_setup(struct console *co, char *options) · line 519
Quoted 5 lines
drivers/serial/mcf.c +1
-1-if ((co->index >=0 ) && (co->index <=MCF_MAXPORTS )) +if ((co->index <0 ) || (co->index >=MCF_MAXPORTS )) co->index =0 ; port = &mcf_ports[co->index].port;if (port->membase ==0 )
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line · Lennart Sorensen
Perhaps CCing [email protected] would be a good idea.
Thanks, but this is a uClinux driver.
I have commited this to the m68knommu git tree on kernel.org.
Thanks
Greg
Quoted 46 lines
Quoted 22 lines · Lennart Sorensen
Quoted 21 lines
Due to a case of backwards logic,
mfc.calways makes the console port be ttyS0 even when you ask for another port.This patch fixes this issue.
Only when the requested port is NOT in the range 0 to MAXPORTS-1 do we force it to be treated as if port 0 was requested. Forcing the port to 0 when it is in fact in the range 0 to MAXPORTS is not helpful.
Tested with working console on ttyS2 on a 5271evb.
Signed-off-by Len Sorensen <[email protected]>drivers/serial/mcf.c +0
-0@@ -513,7 +513,7 @@ static int __init mcf_console_setup(struct console *co, char *options)int parity ='n' ;int flow ='n' ;Quoted 5 lines
drivers/serial/mcf.c static int __init mcf_console_setup(struct console *co, char *options) · line 519
Quoted 5 lines
drivers/serial/mcf.c +1
-1-if ((co->index >=0 ) && (co->index <=MCF_MAXPORTS )) +if ((co->index <0 ) || (co->index >=MCF_MAXPORTS )) co->index =0 ; port = &mcf_ports[co->index].port;if (port->membase ==0 )Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Signature · 5 lines
------------------------------------------------------------------------ Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear, a McAfee Company PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line · Lennart Sorensen
Perhaps CCing [email protected] would be a good idea.
Thanks, but this is a uClinux driver.
This is a patch against Linus's current tree. How is that a uClinux driver? I am using a build of yesterday's git tree from Linus on a 5271evb board and this fixes the console port with it. I have no user space yet, so whatever does uClinux have to do with anything?
Signature · 1 line
Len Sorensen
Quoted 10 lines · Lennart Sorensen
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line · Lennart Sorensen
Perhaps CCing [email protected] would be a good idea.
Thanks, but this is a uClinux driver.
This is a patch against Linus's current tree. How is that a uClinux driver? I am using a build of yesterday's git tree from Linus on a 5271evb board and this fixes the console port with it. I have no user space yet, so whatever does uClinux have to do with anything?
[email protected] handles m68k (with MMU) only. [email protected] handles m68knommu.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 2 lines · Geert Uytterhoeven
[email protected] handles m68k (with MMU) only. [email protected] handles m68knommu.
Oh. I think I got confused by the fact the same arch/m68k/include is used for both. so I looked up m68k in MAINTAINERS.
I will start bothering [email protected] instead.
So by uclinux driver you meant m68knommu uclinux driver. I was thinking uclibc for some reason.
Signature · 1 line
Len Sorensen
Quoted 6 lines · Lennart Sorensen
Quoted 2 lines · Geert Uytterhoeven
[email protected] handles m68k (with MMU) only. [email protected] handles m68knommu.
Oh. I think I got confused by the fact the same
arch/m68k/includeis used for both. so I looked up m68k inMAINTAINERS.
Yeah, we just merged it a few day ago :-)
The goal is to merge arch/m68k{,nommu}, too (eventually)...
Quoted 4 lines
I will start bothering [email protected] instead.
So by uclinux driver you meant m68knommu uclinux driver. I was thinking uclibc for some reason.
Yes, m68knommu uclinux driver.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Lennart Sorensen
Quoted 2 lines · Geert Uytterhoeven
[email protected] handles m68k (with MMU) only. [email protected] handles m68knommu.
Oh. I think I got confused by the fact the same
arch/m68k/includeis used for both. so I looked up m68k inMAINTAINERS.
Well, you could try sending to the listed author at the top of mcf.c as well :-)
Regards
Greg
Quoted 29 lines
Yeah, we just merged it a few day ago :-)
The goal is to merge
arch/m68k{,nommu}, too (eventually)...Quoted 4 lines
I will start bothering [email protected] instead.
So by uclinux driver you meant m68knommu uclinux driver. I was thinking uclibc for some reason.
Yes, m68knommu uclinux driver.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Signature · 5 lines
------------------------------------------------------------------------ Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear, a McAfee Company PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com