The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tushar Behera <tushar.behera@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	jslaby@suse.cz, broonie@kernel.org
Subject: Re: [PATCH] tty: Fallback to use dynamic major number
Date: Thu, 16 Jan 2014 08:18:41 -0800	[thread overview]
Message-ID: <20140116161841.GA7476@kroah.com> (raw)
In-Reply-To: <1389848602-30985-1-git-send-email-tushar.behera@linaro.org>

On Thu, Jan 16, 2014 at 10:33:22AM +0530, Tushar Behera wrote:
> In a multi-platform scenario, the hard-coded major/minor numbers in
> serial drivers may conflict with each other. A typical scenario is
> observed with amba-pl011 and samsung-uart drivers, both of these
> drivers use same set of major/minor numbers. If both of these drivers
> are enabled, probe of samsung-uart driver fails because the desired
> node is busy.

Why would both drivers ever be loaded at the same time?  Don't they bind
to different hardware devices, and as such, never will be in the same
system?

The driver shouldn't be registering it's tty devices if the hardware
isn't present in the system, so how can this codepath ever happen?

> The issue is fixed by adding a fallback in driver core, so that we can
> use dynamic major number in case device node allocation fails for
> hard-coded major/minor number.

Did you test this out?  You still get userspace breakage with it :(

> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> Hi Greg,
> 
> This is my second attempt at getting this fixed. Let me know if you are
> okay with this.
> 
> Initial approach to fix this problem was by forcing samsung-uart driver
> to use dynamic major number, but it was rejected [1] because of possible
> user-space breakage.

"possible"?  Heh, no, that should be "real".

Sorry, but I think you are trying to fix a problem that never actually
happens in real life, or in valid configurations...

greg k-h

  reply	other threads:[~2014-01-16 16:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16  5:03 [PATCH] tty: Fallback to use dynamic major number Tushar Behera
2014-01-16 16:18 ` Greg KH [this message]
2014-01-16 17:08   ` Mark Brown
2014-01-16 17:22     ` Greg KH
2014-01-16 18:15       ` Mark Brown
2014-01-17  9:24         ` Tushar Behera

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=20140116161841.GA7476@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=broonie@kernel.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tushar.behera@linaro.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