Re: Automatic load of PCI kernel modules [WAS: [RFT] Automatic load of USB kernel modules]

From: Warner Losh <imp_at_bsdimp.com>
Date: Sun, 26 Jun 2011 11:51:51 -0600
On Jun 26, 2011, at 4:33 AM, Robert Millan wrote:

> 2011/6/26 Hans Petter Selasky <hselasky_at_c2i.net>:
>> Hi,
>> 
>> I see that a lot of PCI device drivers use code to check their ID's.
>> 
>> [...]
> 
> I seem to recall devd doesn't process PCI because it is event-driven and
> there are no "events" associated with PCI cards.

That's totally false.

> Perhaps it could be modified to scan for PCI cards via libpci on initialization
> and generate "fake" events for them?

Since your premise is false, this solution also is false.

Devices are handled in a completely uniform manner in the system.  When they attach, an attach even is generated.  When they detach, a detach event is generated.  When there is no driver attached after the probe/attach sequence, a NOMATCH event is generated.  Events are queued up during the early boot process until devd can run.  They are then processed in order.  Devices that haven't had a driver attach to them would be processed when devd had a chance to start.

Warner
Received on Sun Jun 26 2011 - 15:54:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:15 UTC