public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Måns Rullgård" <mans@mansr.com>
Cc: Jiri Slaby <jirislaby@kernel.org>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: 8250: add option to disable registration of legacy ISA ports
Date: Sun, 31 Jan 2021 16:53:54 +0100	[thread overview]
Message-ID: <YBbSkig1wcXlbN7f@kroah.com> (raw)
In-Reply-To: <yw1xsg6hcdlt.fsf@mansr.com>

On Sun, Jan 31, 2021 at 03:47:42PM +0000, Måns Rullgård wrote:
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> 
> > On Sun, Jan 31, 2021 at 01:18:47PM +0000, Måns Rullgård wrote:
> >> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> >> 
> >> > On Thu, Jan 28, 2021 at 05:22:44PM +0000, Mans Rullgard wrote:
> >> >> On systems that do not have the traditional PC ISA serial ports, the
> >> >> 8250 driver still creates non-functional device nodes.  This change
> >> >> makes only ports that actually exist (PCI, DT, ...) get device nodes.
> >> >> 
> >> >> Signed-off-by: Mans Rullgard <mans@mansr.com>
> >> >> ---
> >> >>  drivers/tty/serial/8250/8250_core.c | 26 ++++++++++++++++++++------
> >> >>  drivers/tty/serial/8250/Kconfig     |  5 +++++
> >> >>  2 files changed, 25 insertions(+), 6 deletions(-)
> >> >> 
> >> >> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> >> >> index cae61d1ebec5..49695dd3677c 100644
> >> >> --- a/drivers/tty/serial/8250/8250_core.c
> >> >> +++ b/drivers/tty/serial/8250/8250_core.c
> >> >> @@ -555,6 +555,7 @@ static void __init serial8250_isa_init_ports(void)
> >> >>  	}
> >> >>  }
> >> >>  
> >> >> +#ifdef CONFIG_SERIAL_8250_ISA
> >> >
> >> > This is just making a mess of the code. 
> >> 
> >> It was already a mess.
> >
> > True, but don't make it a worse one please.
> >
> >> 
> >> > To do this right, pull the isa code out into a separate file and put
> >> > the #ifdef in a .h file, so we can properly maintain and support this
> >> > code over time.  This change as-is is not going to make that any
> >> > easier :(
> >> 
> >> I might put in that effort if there's a reasonable chance this change
> >> will be accepted.  If it's going to be rejected regardless, I'd rather
> >> not waste my time.
> >> 
> >> >> +config SERIAL_8250_ISA
> >> >> +	bool "8250/16550 ISA device support" if EXPERT
> >> >
> >> > So, no one will set this?
> >> 
> >> I followed the pattern of the existing SERIAL_8250_PNP option.  Was that
> >> a mistake?  How would you prefer it?
> >
> > I don't know, I'm just asking.
> >
> >> > What userspace visable change will be caused by this? 
> >> 
> >> There won't be /dev/ttyS devices for ports that don't exist.
> >> 
> >> > Will ports get renumbered?
> >> 
> >> Not if they had predictable numbers to begin with.
> >
> > So that would be "yes"?  If so, obviously we couldn't take this, right?
> 
> On a Beaglebone Black based system with some of the UARTs enabled, those
> keep their numbers such that e.g. ttyS0, ttyS1, and ttyS4 show up in
> /dev while ttyS2 and ttyS3 do not since they don't correspond to any
> (enabled) ports.
> 
> If any of the very many variants of this driver do not assign fixed
> numbers, those would possibly be renumbered.  Should that be the case,
> the numbering was never guaranteed to begin with, so I fail to see any
> problem.

Ok, if that's the case, then yes, a cleaned up version of this patch
would be nice, thanks!

greg k-h

  reply	other threads:[~2021-01-31 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 17:22 [PATCH] serial: 8250: add option to disable registration of legacy ISA ports Mans Rullgard
     [not found] ` <CAHp75VenDC0R3uX4_=Yzii-q5Z-YWcfT2_OO0yJkYehYAHDCew@mail.gmail.com>
2021-01-31 19:47   ` Måns Rullgård
2021-02-01  7:38   ` Greg Kroah-Hartman
     [not found] ` <YBam2m2VMowH5Yth@kroah.com>
     [not found]   ` <yw1xwnvtcki0.fsf@mansr.com>
     [not found]     ` <YBa0J82FrD6mdP/v@kroah.com>
2021-01-31 15:47       ` Måns Rullgård
2021-01-31 15:53         ` Greg Kroah-Hartman [this message]
2021-02-18 10:49     ` Maarten Brock

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=YBbSkig1wcXlbN7f@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mans@mansr.com \
    /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