mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave@sr71.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	Geert Uytterhoeven <geert+renesas@linux-m68k.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-serial@vger.kernel.org, Jiri Slaby <jslaby@suse.cz>
Subject: Re: post 3.14 serial regression
Date: Wed, 09 Apr 2014 13:04:03 -0700	[thread overview]
Message-ID: <5345A7B3.7020005@sr71.net> (raw)
In-Reply-To: <CAMuHMdXSa0Ku2f1CR3j5pGOp_joQomc2Cnz=apGRR1K0Eb2qOQ@mail.gmail.com>

On 04/09/2014 12:41 PM, Geert Uytterhoeven wrote:
> Dave: If I understand it correctly, you use console=ttyS2, while the kernel
> suddenly changed the order of the serial devices, so your port is no
> longer ttyS2, but ttyS4. Hence the serial port is not found, and
> uart_remove_one_port() is called on it, taking away your /dev/console for
> userspace?

Right.

> Why does the serial port driver call uart_add_one_port() for ports that
> don't exist?
> Or if it does exist ("inaccessible and buried inside the system somewhere"),
> how is it removed again?

The ones buried inside the system are immaterial here.  I just wanted to
explain why I was using a separate PCI card instead of the other serial
ports.

>>From the backtrace, it's the call below to uart_remove_one_port()
> that removes the port?
> 
> /**
>  *      serial8250_register_8250_port - register a serial port
>  *      @up: serial port template
>  *
>  *      Configure the serial port specified by the request. If the
>  *      port exists and is in use, it is hung up and unregistered
>  *      first.
>  *
>  *      The port is then probed and if necessary the IRQ is autodetected
>  *      If this fails an error is returned.
>  *
>  *      On success the port is ready to use and the line number is returned.
>  */
> int serial8250_register_8250_port(struct uart_8250_port *up)
> {
>         ...
> 
>         if (uart && uart->port.type != PORT_8250_CIR) {
>                 if (uart->port.dev)
>                         uart_remove_one_port(&serial8250_reg, &uart->port);
> 
> where was it added before?

Remember, serial8250_find_match_or_unused() will also reuse *EXISTING*
uart_ports if the port is of 'unknown' type.

I believe that port got added during the addition of the
serial8250_isa_devs, and now we're trying to reuse it since it is an
unknown port type.

  reply	other threads:[~2014-04-09 20:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08  0:23 Dave Hansen
2014-04-08 11:27 ` One Thousand Gnomes
2014-04-08 21:03   ` Dave Hansen
2014-04-08 21:38     ` Dave Hansen
2014-04-09  0:36       ` Greg Kroah-Hartman
2014-04-09 16:02         ` Dave Hansen
2014-04-09 19:41         ` Geert Uytterhoeven
2014-04-09 20:04           ` Dave Hansen [this message]
2014-04-09 20:59             ` Geert Uytterhoeven
2014-04-09 21:19               ` Dave Hansen
2014-04-10 11:14               ` One Thousand Gnomes

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=5345A7B3.7020005@sr71.net \
    --to=dave@sr71.net \
    --cc=dave.hansen@intel.com \
    --cc=geert+renesas@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --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

Powered by JetHome