linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Alan Cox <alan@linux.intel.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-ide@vger.kernel.org, jeff@garzik.org
Subject: Re: [PATCH RFC] ata: Intel IDE-R support
Date: Thu, 19 Aug 2010 13:42:18 +0200	[thread overview]
Message-ID: <4C6D189A.2080706@kernel.org> (raw)
In-Reply-To: <1282217732.1236.19.camel@yio.site>

Hello,

On 08/19/2010 01:35 PM, Kay Sievers wrote:
> On Thu, 2010-08-19 at 13:22 +0200, Tejun Heo wrote:
>> Kay, there are a few ATA drivers with overlapping hardware support.
>> When all the drivers are built-in the kernel or none of them is loaded
>> as modules, priority among them as defined by link order is followed;
>> however, if one of the drivers is already loaded while other
>> overlapping ones are not, there's nothing which guarantees driver
>> probing would happen after modprobe for the device ID is complete,
> 
> Not sure it if I get it right. You mean the first driver binds to the
> device already, right? But you want the later one to be used?
> 
> Any driver that binds to a device will prevent any other later loaded
> driver from binding to, or handling the device. The only way to have the
> second driver seeing the device is unbinding the first driver in sysfs,
> and binding the second one in sysfs.

It's a bit messy to explain.  So, if all the drivers are already
inside the kernel device - driver matching would follow the priority.
If none of the drivers is in the kernel, udev will call modprobe to
with device ID and modprobe will follow the link order and load the
matching drivers in link order.  What I was curious about is what
happens if some of them are already in the kernel but not all of them.
udev would still be invoked the same and modprobe too but device -
driver matching can and is probably likely to happen before modprobe
finishes loading all the drivers, right?  Or is there a mechanism to
hold off device - driver matching before the udev finishes handling
the event for the controller?

Thanks.

-- 
tejun

  reply	other threads:[~2010-08-19 11:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10 15:56 [PATCH RFC] ata: Intel IDE-R support Alan Cox
2010-08-10 17:12 ` Sergei Shtylyov
2010-08-10 22:23   ` Alan Cox
2010-08-17 16:19 ` Tejun Heo
2010-08-17 16:42   ` Alan Cox
2010-08-17 16:30     ` Tejun Heo
2010-08-17 17:01       ` Alan Cox
2010-08-17 16:59         ` Tejun Heo
2010-08-17 18:23           ` Alan Cox
2010-08-18  6:19             ` Tejun Heo
2010-08-18 10:03               ` Alan Cox
2010-08-18 14:10                 ` Tejun Heo
2010-08-18 15:15                   ` Alan Cox
2010-08-19  9:37                     ` Tejun Heo
2010-08-19 10:09                       ` Alan Cox
2010-08-19 11:22                         ` Tejun Heo
2010-08-19 11:35                           ` Kay Sievers
2010-08-19 11:42                             ` Tejun Heo [this message]
2010-08-19 12:24                               ` Kay Sievers
2010-08-19 12:33                                 ` Tejun Heo
2010-08-19 12:52                                   ` Kay Sievers
2010-08-19 12:54                                     ` Tejun Heo
2010-08-19 13:08                                       ` Kay Sievers
2010-08-19 13:14                                         ` Tejun Heo
2010-08-19 12:56                           ` Tejun Heo
2010-08-19 18:05                             ` Jeff Garzik
2010-08-19 11:02                       ` Tim Small

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=4C6D189A.2080706@kernel.org \
    --to=tj@kernel.org \
    --cc=alan@linux.intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).