* Re: Fix support for console port other than ttyS0 on mcf.c
[not found] <20090204201518.GH26064@csclub.uwaterloo.ca>
@ 2009-02-04 20:20 ` Lennart Sorensen
[not found] ` <20090204202009.GI26064@csclub.uwaterloo.ca>
1 sibling, 0 replies; 8+ messages in thread
From: Lennart Sorensen @ 2009-02-04 20:20 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-m68k
Perhaps CCing linux-m68k@lists.linux-m68k.org would be a good idea.
--
Len Sorensen
On Wed, Feb 04, 2009 at 03:15:18PM -0500, Lennart Sorensen wrote:
> 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.
>
> Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
>
> diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
> index 56841fe..0eefb07 100644
> --- a/drivers/serial/mcf.c
> +++ b/drivers/serial/mcf.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fix support for console port other than ttyS0 on mcf.c
[not found] ` <20090204202009.GI26064@csclub.uwaterloo.ca>
@ 2009-02-04 21:00 ` Geert Uytterhoeven
2009-02-05 0:24 ` [uClinux-dev] " Greg Ungerer
2009-02-05 15:27 ` Lennart Sorensen
0 siblings, 2 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2009-02-04 21:00 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Linux Kernel Development, linux-m68k, uClinux list
On Wed, 4 Feb 2009, Lennart Sorensen wrote:
> Perhaps CCing linux-m68k@lists.linux-m68k.org would be a good idea.
Thanks, but this is a uClinux driver.
> On Wed, Feb 04, 2009 at 03:15:18PM -0500, Lennart Sorensen wrote:
> > 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.
> >
> > Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
> >
> > diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
> > index 56841fe..0eefb07 100644
> > --- a/drivers/serial/mcf.c
> > +++ b/drivers/serial/mcf.c
> > @@ -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)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uClinux-dev] Re: Fix support for console port other than ttyS0 on mcf.c
2009-02-04 21:00 ` Geert Uytterhoeven
@ 2009-02-05 0:24 ` Greg Ungerer
2009-02-05 15:27 ` Lennart Sorensen
1 sibling, 0 replies; 8+ messages in thread
From: Greg Ungerer @ 2009-02-05 0:24 UTC (permalink / raw)
To: uClinux development list
Cc: Lennart Sorensen, linux-m68k, Linux Kernel Development
Geert Uytterhoeven wrote:
> On Wed, 4 Feb 2009, Lennart Sorensen wrote:
>> Perhaps CCing linux-m68k@lists.linux-m68k.org 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
>> On Wed, Feb 04, 2009 at 03:15:18PM -0500, Lennart Sorensen wrote:
>>> 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.
>>>
>>> Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
>>>
>>> diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
>>> index 56841fe..0eefb07 100644
>>> --- a/drivers/serial/mcf.c
>>> +++ b/drivers/serial/mcf.c
>>> @@ -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)
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> 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
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fix support for console port other than ttyS0 on mcf.c
2009-02-04 21:00 ` Geert Uytterhoeven
2009-02-05 0:24 ` [uClinux-dev] " Greg Ungerer
@ 2009-02-05 15:27 ` Lennart Sorensen
2009-02-05 15:53 ` Geert Uytterhoeven
1 sibling, 1 reply; 8+ messages in thread
From: Lennart Sorensen @ 2009-02-05 15:27 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux Kernel Development, linux-m68k, uClinux list
On Wed, Feb 04, 2009 at 10:00:58PM +0100, Geert Uytterhoeven wrote:
> On Wed, 4 Feb 2009, Lennart Sorensen wrote:
> > Perhaps CCing linux-m68k@lists.linux-m68k.org 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?
--
Len Sorensen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fix support for console port other than ttyS0 on mcf.c
2009-02-05 15:27 ` Lennart Sorensen
@ 2009-02-05 15:53 ` Geert Uytterhoeven
2009-02-05 15:57 ` Lennart Sorensen
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2009-02-05 15:53 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Linux Kernel Development, linux-m68k, uClinux list
On Thu, 5 Feb 2009, Lennart Sorensen wrote:
> On Wed, Feb 04, 2009 at 10:00:58PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 4 Feb 2009, Lennart Sorensen wrote:
> > > Perhaps CCing linux-m68k@lists.linux-m68k.org 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?
linux-m68k@lists.linux-m68k.org handles m68k (with MMU) only.
uclinux-dev@uclinux.org handles m68knommu.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fix support for console port other than ttyS0 on mcf.c
2009-02-05 15:53 ` Geert Uytterhoeven
@ 2009-02-05 15:57 ` Lennart Sorensen
2009-02-05 16:36 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: Lennart Sorensen @ 2009-02-05 15:57 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux Kernel Development, linux-m68k, uClinux list
On Thu, Feb 05, 2009 at 04:53:50PM +0100, Geert Uytterhoeven wrote:
> linux-m68k@lists.linux-m68k.org handles m68k (with MMU) only.
> uclinux-dev@uclinux.org 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 uclinux-dev@uclinux.org instead.
So by uclinux driver you meant m68knommu uclinux driver. I was thinking
uclibc for some reason.
--
Len Sorensen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fix support for console port other than ttyS0 on mcf.c
2009-02-05 15:57 ` Lennart Sorensen
@ 2009-02-05 16:36 ` Geert Uytterhoeven
2009-02-05 23:45 ` [uClinux-dev] " Greg Ungerer
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2009-02-05 16:36 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Linux Kernel Development, linux-m68k, uClinux list
On Thu, 5 Feb 2009, Lennart Sorensen wrote:
> On Thu, Feb 05, 2009 at 04:53:50PM +0100, Geert Uytterhoeven wrote:
> > linux-m68k@lists.linux-m68k.org handles m68k (with MMU) only.
> > uclinux-dev@uclinux.org 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.
Yeah, we just merged it a few day ago :-)
The goal is to merge arch/m68k{,nommu}, too (eventually)...
> I will start bothering uclinux-dev@uclinux.org 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 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uClinux-dev] Re: Fix support for console port other than ttyS0 on mcf.c
2009-02-05 16:36 ` Geert Uytterhoeven
@ 2009-02-05 23:45 ` Greg Ungerer
0 siblings, 0 replies; 8+ messages in thread
From: Greg Ungerer @ 2009-02-05 23:45 UTC (permalink / raw)
To: uClinux development list
Cc: Lennart Sorensen, linux-m68k, Linux Kernel Development
Geert Uytterhoeven wrote:
> On Thu, 5 Feb 2009, Lennart Sorensen wrote:
>> On Thu, Feb 05, 2009 at 04:53:50PM +0100, Geert Uytterhoeven wrote:
>>> linux-m68k@lists.linux-m68k.org handles m68k (with MMU) only.
>>> uclinux-dev@uclinux.org 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.
Well, you could try sending to the listed author at the top of mcf.c
as well :-)
Regards
Greg
> Yeah, we just merged it a few day ago :-)
>
> The goal is to merge arch/m68k{,nommu}, too (eventually)...
>
>> I will start bothering uclinux-dev@uclinux.org 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 -- geert@linux-m68k.org
>
> 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
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-02-05 23:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090204201518.GH26064@csclub.uwaterloo.ca>
2009-02-04 20:20 ` Fix support for console port other than ttyS0 on mcf.c Lennart Sorensen
[not found] ` <20090204202009.GI26064@csclub.uwaterloo.ca>
2009-02-04 21:00 ` Geert Uytterhoeven
2009-02-05 0:24 ` [uClinux-dev] " Greg Ungerer
2009-02-05 15:27 ` Lennart Sorensen
2009-02-05 15:53 ` Geert Uytterhoeven
2009-02-05 15:57 ` Lennart Sorensen
2009-02-05 16:36 ` Geert Uytterhoeven
2009-02-05 23:45 ` [uClinux-dev] " Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox