mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt_Domsch@Dell.com
To: rusty@rustcorp.com.au
Cc: greg@kroah.com, linux-kernel@vger.kernel.org, mochel@osdl.org
Subject: Re: Displaying/modifying PCI device id tables via sysfs
Date: Thu, 22 May 2003 21:27:01 -0500	[thread overview]
Message-ID: <1053656836.21630.25.camel@iguana.localdomain> (raw)

> So the question is, how do you add PCI IDs to a module which isn't
> loaded?

I think the key is here, in drivers/pci/pci-driver.c:

/**
 * pci_register_driver - register a new pci driver
 * @drv: the driver structure to register
 * 
 * Adds the driver structure to the list of registered drivers
 * Returns the number of pci devices which were claimed by the driver
 * during registration.  The driver remains registered even if the
 * return value is zero.
 */
int
pci_register_driver(struct pci_driver *drv)


So it's perfectly legal to have a driver loaded, for which no device
instances are present.  Then you can add the new ID, and it gets probed
for automatically.  When I was testing this, I had the e100 driver built
in statically, and though it didn't have the ID for my actual device in
the table, it remained available.  When I used the new_id interface to
add the ID, then it probed for devices again, the new ID matched, and it
attached itself to the hardware instance.

Granted, today not all the drivers do this.  But I think it's part of
the grand hotplug scheme to allow them to do so.

This does also mean that a whole pile of drivers, for which hardware may
*never* be present, could be loaded.  My sysfs tree shows drivers for
several PCI devices, which I left as =y in my .config file, which don't
exist in my system.

I'll be out of touch the next few days, but will join back in any
discussion next week.

Thanks,
Matt

-- 
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com



             reply	other threads:[~2003-05-23  2:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23  2:27 Matt_Domsch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-03 17:57 Matt Domsch
2003-03-03 18:25 ` Greg KH
2003-03-03 20:02   ` Alan Cox
2003-03-03 20:56   ` Matt Domsch
2003-03-04  0:31     ` Greg KH
2003-03-04  4:56       ` Matt Domsch
2003-03-04 14:10         ` Patrick Mochel
2003-03-04 20:22         ` Kai Germaschewski
2003-03-04 22:39           ` Alan Cox
2003-03-04 22:57           ` Jeff Garzik
2003-03-04  0:34     ` Jeff Garzik
2003-05-23  0:53   ` Rusty Russell
2003-05-24  0:37     ` Greg KH
2003-05-25  4:57       ` Rusty Russell

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=1053656836.21630.25.camel@iguana.localdomain \
    --to=matt_domsch@dell.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®