From: Arjan van de Ven <arjanv@redhat.com>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: Eric Kerin <eric@bootseg.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] 2.6.0 aic7xxx and aic79xx stale pci_device list entry
Date: Sun, 4 Jan 2004 11:04:48 +0100 [thread overview]
Message-ID: <20040104100448.GA2416@devserv.devel.redhat.com> (raw)
In-Reply-To: <1282412704.1073168696@aslan.scsiguy.com>
[-- Attachment #1: Type: text/plain, Size: 2334 bytes --]
On Sat, Jan 03, 2004 at 03:24:56PM -0700, Justin T. Gibbs wrote:
> > well in 2.6 modules are supposed to remain loaded even though no device
> > is found (since one can be hotplugged later) so that part of the driver
> > needs changing; other than that yes the driver needs to deregister
> > itself....
>
> Is this policy change documented somewhere?
Documentation/pci.txt has it (albeit not extremely explicit):
0. Structure of PCI drivers
~~~~~~~~~~~~~~~~~~~~~~~~~~
There exist two kinds of PCI drivers: new-style ones (which leave most of
probing for devices to the PCI layer and support online insertion and
removal of devices [thus supporting PCI, hot-pluggable PCI and CardBus in a
single driver]) <snip>
1. New-style drivers
~~~~~~~~~~~~~~~~~~~
The new-style drivers just call pci_register_driver during their
initialization with a pointer to a structure describing the driver (struct
pci_driver) which contains:
<snip>
probe Pointer to a probing function which gets called (during
execution of pci_register_driver for already existing
devices or later if a new device gets inserted) for all
PCI devices which match the ID table and are not handled
by the other drivers yet. This function gets passed a
pointer to the pci_dev structure representing the device
and also which entry in the ID table did the device
match. It returns zero when the driver has accepted the
device or an error code (negative number) otherwise.
This function always gets called from process context,
so it can sleep.
<snip the rest>
-----------------
There are 2 reasons to work this way, and I would very much prefer the
adaptec drivers to behave like this:
1) PCI Hotplugging
2) Adding PCI ID's at runtime
While you may not care about 1), a lot of IHV/distros care about 2); eg if
Adaptec puts out a card that can be driven by aic79xx but with just a new PCI ID,
hardware vendors can just add the ID at runtime and have it work in the
(factory) installer etc but only *if the driver is loaded* ....
Greetings,
Arjan van de Ven
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-01-04 10:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-02 20:50 [PATCH] 2.6.0 aic7xxx and aic79xx stale pci_device list entry Eric Kerin
2004-01-03 9:01 ` Arjan van de Ven
2004-01-03 11:12 ` Eric Kerin
2004-01-03 13:59 ` Jan-Benedict Glaw
2004-01-24 16:09 ` Eric Kerin
2004-01-03 22:24 ` Justin T. Gibbs
2004-01-04 10:04 ` Arjan van de Ven [this message]
2004-01-30 5:25 ` Justin T. Gibbs
2004-01-30 14:41 ` Arjan van de Ven
2004-01-30 15:03 ` Justin T. Gibbs
2004-01-03 22:24 ` Justin T. Gibbs
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=20040104100448.GA2416@devserv.devel.redhat.com \
--to=arjanv@redhat.com \
--cc=eric@bootseg.com \
--cc=gibbs@scsiguy.com \
--cc=linux-scsi@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