public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-serial@vger.kernel.org
Subject: Re: How to get a list of all available serial ports?
Date: Thu, 26 Aug 2004 14:09:56 +0200	[thread overview]
Message-ID: <20040826120956.GP18334@lug-owl.de> (raw)
In-Reply-To: <412DC0EB.1090605@wincor-nixdorf.com>

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

On Thu, 2004-08-26 12:52:27 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
wrote in message <412DC0EB.1090605@wincor-nixdorf.com>:
> hi,
> 
> cat /proc/ioports and serach serial
> 
[...]
> 02f8-02ff : serial(auto)
[...]
> 03f8-03ff : serial(auto)

That's *very* unreliable. There are a lot of UARTs that handle more than
one serial port within one I/O space or PCI bar, so you'd "miss" those.
To be honest, I think that quite a lot of the non-8250 UARTs will
actually handle more than one serial port...

> or cat /proc/tty/driver/serial
> 
> serinfo:1.0 driver:5.05c revision:2001-07-08
> 0: uart:16550A port:3F8 irq:4 baud:9600 tx:11 rx:0
> 1: uart:16550A port:2F8 irq:3 baud:9600 tx:11 rx:0

I actually think that this is one of the mest methods to find out about
serial ports from userspace (among letting the user specify the correct
device node for it:-)  Also (just as a hint), don't really worry about
I/O address, uart type (as long as it isn't "unknown") or IRQ. It's
somewhat architecture dependant (eg. Sparc64 used to show off vector
addresses instead of IRQ numbers, so you'd see an address instead...).

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2004-08-26 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26  7:24 How to get a list of all available serial ports? Francisco M. Marzoa Alonso
2004-08-26 10:51 ` Jan-Benedict Glaw
2004-08-26 10:52 ` Salomon, Frank
2004-08-26 12:09   ` Jan-Benedict Glaw [this message]

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=20040826120956.GP18334@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=linux-serial@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