public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: david-b@pacbell.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.13-git] 8250 tweaks
Date: Tue, 12 Jul 2005 13:01:19 +0100	[thread overview]
Message-ID: <20050712130119.A30358@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050712113212.0C90EBF3D5@adsl-69-107-32-110.dsl.pltn13.pacbell.net>; from david-b@pacbell.net on Tue, Jul 12, 2005 at 04:32:12AM -0700

On Tue, Jul 12, 2005 at 04:32:12AM -0700, david-b@pacbell.net wrote:
> > >     ttyS0 at MMIO 0xfffb0000 (irq = 46) is a ST16654
> > >     serial8250 serial8250.0: unable to register port at index 1 (IO0 MEM0 IRQ47): -28
> > >     serial8250 serial8250.0: unable to register port at index 2 (IO0 MEM0 IRQ15): -28
> >
> > Thanks, that's exactly what I wanted to know.
> >
> > -28 is -ENOSPC which means that you've run out of available serial devices
> > to register these others.
> 
> The idea is _not_ to register them on boards that only have a
> single RS232 connector.  The fix was just having the 8250 code
> understand that it should only register ports that are real.

The tty code doesn't work like that.  You must know how many ports
you want right from the start.  You can't dynamically add new ports
to an already registered driver without first unregistering all the
existing ports, unregistering the driver, adjusting the number of
ports, reregistering the driver and all the ports.

If you've got one already open, your only option in that case is to
ignore any attempt to add new ports.

Obviously this is not acceptable.  So please don't try to dictate
what serial should do.  It does things the way it does them to work
around other bits of the kernel which are lacking in various ways.

> > If you wish to have three ports in an plat_serial8250_port array, you'll
> > need to ensure that CONFIG_SERIAL_8250_NR_UARTS is set to at least 3.
> 
> That is, there's no third way which (a) doesn't waste that memory,
> and (b) doesn't produce annoying messages about non-error cases?

Correct.

> ISTR that having NR_UARTS bigger just produced different messages...

Which were?

It works for me on my platforms here, and everyone else on x86.  I
even had a situation where I had NR_UARTS set to 64 but only one
registered... which also worked fine with no extraneous kernel
messages.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-07-12 12:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12  2:22 [patch 2.6.13-git] 8250 tweaks David Brownell
2005-07-12  7:19 ` Russell King
2005-07-12  9:14   ` Russell King
2005-07-12 10:25   ` david-b
2005-07-12 11:08     ` Russell King
2005-07-12 11:32       ` david-b
2005-07-12 12:01         ` Russell King [this message]
2005-07-12 13:30           ` david-b
2005-07-12 14:00             ` Russell King
2005-07-13  4:55           ` Sam Song
2005-07-13  6:12             ` Russell King
2005-07-13 10:51               ` Sam Song
2005-07-13 12:48                 ` Russell King
2005-07-14  7:12                   ` Sam Song
2005-07-14 10:42                     ` Russell King
2005-07-15  5:11                       ` Sam Song
2005-07-16  8:43                         ` Russell King
2005-07-16 10:12                           ` Sam Song
2005-07-16 10:15                             ` Russell King
2005-07-16 12:31                               ` Sam Song

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=20050712130119.A30358@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.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