I just have one question about how device drivers are supposed to attach when loaded as modules.
I've noticed this is the most commonly used method of attachment throught the kernel:
...
case MODULE_CMD_INIT:
#ifdef _MODULE
error = config_init_component(cfdriver_ioconf_if_ath_pci,
cfattach_ioconf_if_ath_pci, cfdata_ioconf_if_ath_pci);
#endif
return error;
case MODULE_CMD_FINI:
...
And so on.
Since I rarely used modules when looking for particular drivers, I just noticed that by loading (and unloading) a module from the command line, no new device is recognized or attached.
In some cases, especially in pci drivers, just a rescan messages is shown.
So my question is: are module device drivers supposed to attach and init a real device driver instance, or are they just a method of inserting the right autoconf glue, before the autoconfiguration process take place?
Shouldn't a new device driver module also perform some kind of bus enumeration scan, and then attach a new real device instance (by calling config_attach, or config_found, etc..