public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Russell King - ARM Linux <linux@armlinux.org.uk>,
	Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jiri Slaby <jslaby@suse.com>
Subject: Re: [PATCH 0/2] Move uart_register_driver call to device probe for pl010 and sh-sci
Date: Fri, 31 Mar 2017 15:27:42 +0200	[thread overview]
Message-ID: <20170331132742.GA23739@kroah.com> (raw)
In-Reply-To: <CAMuHMdUkfzJw6W0jQZPChN+Uqb0Ewkn86o0Pzd+9+Wi1-XZRAw@mail.gmail.com>

On Sun, Mar 26, 2017 at 11:22:57AM +0200, Geert Uytterhoeven wrote:
> Hi Russell, Sjoerd,
> 
> On Fri, Mar 24, 2017 at 5:42 PM, Russell King - ARM Linux
> <linux@armlinux.org.uk> wrote:
> > On Fri, Mar 24, 2017 at 05:26:32PM +0100, Sjoerd Simons wrote:
> >> When testing on a Renesas board with the PL010 serial driver enabled
> >> serial output broke. Turns out the minor device numbers for both
> >> drivers happen to overlap, causing whichever driver happened to be the
> >> second one to register to fail.
> >
> > How the **** has the SH serial driver ended up with overlapping device
> > numbers?
> 
> Interesting...
> 
> > What happened to our maintained list of allocated major/minor device
> > numbers, which is supposed to stop crap like this happening?
> 
> AMBA PL010 has been assigned major 204, minors 16..31,
> SCI has been assigned major 204, minors 8..11.
> 
> Over the years, Renesas SoCs have been gaining more and more serial
> ports, leading to
> 
>     #define SCI_NPORTS CONFIG_SERIAL_SH_SCI_NR_UARTS
> 
> with CONFIG_SERIAL_SH_SCI_NR_UARTS=20 in shmobile_defconfig and
> multi_v7_defconfig (although the maximum value on any supported SoC is 18).
> 
> But once the value becomes 5 or more, it starts overflowing into the ttyFWx
> and ttyAMx space.
> 
> How to solve this?
> Time for the serial subsystem to switch to dynamic minors, and get rid of the
> what-is-your-serial-port-called-again-on-this-platform
> multi-million-euro question?

Yes, please, we need to do that.  Let's provide a build option for it,
like USB has had for over a decade.  If it's enabled, it's all dynamic,
if not, the "old style" ones are used.  Then we don't accept any new
reservations, making new drivers use the dynamic number, and over a long
time, all should be good.

thanks,

greg k-h

      parent reply	other threads:[~2017-03-31 13:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 16:26 [PATCH 0/2] Move uart_register_driver call to device probe for pl010 and sh-sci Sjoerd Simons
2017-03-24 16:26 ` [PATCH 1/2] serial: pl010: Move uart_register_driver call to device probe Sjoerd Simons
2017-03-24 16:47   ` Russell King - ARM Linux
2017-03-24 16:26 ` [PATCH 2/2] serial: sh-sci: " Sjoerd Simons
2017-03-24 16:42 ` [PATCH 0/2] Move uart_register_driver call to device probe for pl010 and sh-sci Russell King - ARM Linux
2017-03-26  9:22   ` Geert Uytterhoeven
2017-03-26 10:01     ` Russell King - ARM Linux
2017-03-31 13:27     ` Greg Kroah-Hartman [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=20170331132742.GA23739@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=geert@linux-m68k.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=sjoerd.simons@collabora.co.uk \
    /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