From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
linux-m68k@vger.kernel.org,
uClinux list <uclinux-dev@uclinux.org>
Subject: Re: Fix support for console port other than ttyS0 on mcf.c
Date: Wed, 4 Feb 2009 22:00:58 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0902042200340.25136@anakin> (raw)
In-Reply-To: <20090204202009.GI26064@csclub.uwaterloo.ca>
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
next prev parent reply other threads:[~2009-02-04 21:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0902042200340.25136@anakin \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=lsorense@csclub.uwaterloo.ca \
--cc=uclinux-dev@uclinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox