Change order of modules loading in kernel

Nomad Esst noname.esst at yahoo.com
Thu Nov 7 09:58:37 UTC 2013


Hi
First thanks to Mr. John Baldwin, helped me with my previous questions.

With his helps, I made some changes in order to make em and igb driver name ports "foo".
Now the changes are :
"if_igb.c" : Change "igb" to "foo" in device_t structure b:
static driver_t igb_driver = {
"foo", igb_methods, sizeof(struct adapter),
};

static devclass_t igb_devclass;
DRIVER_MODULE(igb, pci, igb_driver, igb_devclass, 0, 0);
MODULE_DEPEND(igb, pci, 1, 1, 1);
MODULE_DEPEND(igb, ether, 1, 1, 1);

Also for "if_em.c" : Change "em" to "foo" in device_t structure b:

static driver_t em_driver = {
"foo", em_methods, sizeof(struct adapter),
};
devclass_t em_devclass;
DRIVER_MODULE(em, pci, em_driver, em_devclass, 0, 0);
MODULE_DEPEND(em, pci, 1, 1, 1);
MODULE_DEPEND(em, ether, 1, 1, 1);

Now, I have my interfaces like : foo0 , foo1 , foo2 , foo3 , foo4 , foo5
The firs four interface (old "igb"s) are located at the right side of my server an the last two ones (old "em"s) are located at the left side, you can see the problem. I want the "em" module load before "igb". Can I do so?
By the way! Different driver naming in device_t structure and in DRIVER_MODULE and the other two macros (as I have done) causes problems?
Thanks in advance


More information about the freebsd-drivers mailing list