aboutsummaryrefslogtreecommitdiff
path: root/clients/net-snk/kernel/modules.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-11-15 10:55:13 +0100
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-12-20 17:56:48 +0100
commit59cc316596b2a92e89323694ac88a20daba81b30 (patch)
tree22384837d7d2fe382083d28cbd2208a8b9d97f8b /clients/net-snk/kernel/modules.c
parent58175836650e6faccb3559fa354b9f2bd504c491 (diff)
downloadSLOF-59cc316596b2a92e89323694ac88a20daba81b30.zip
SLOF-59cc316596b2a92e89323694ac88a20daba81b30.tar.gz
SLOF-59cc316596b2a92e89323694ac88a20daba81b30.tar.bz2
Added net-snk client-interface module
So far the net-snk could only use networking cards that had corresponding drivers in the ROM filesystem. NICs that come with their of FCODE drivers were not supported yet. For these NICs I added now a pseudo-module to the net-snk that is able to use the corresponding device tree nodes via the "read" and "write" functions of the client interface. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'clients/net-snk/kernel/modules.c')
-rw-r--r--clients/net-snk/kernel/modules.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/clients/net-snk/kernel/modules.c b/clients/net-snk/kernel/modules.c
index e06bb9f..a719f27 100644
--- a/clients/net-snk/kernel/modules.c
+++ b/clients/net-snk/kernel/modules.c
@@ -21,7 +21,9 @@
#include <pci.h>
#include "modules.h"
-extern snk_module_t of_module;
+snk_module_t * cimod_check_and_install(void);
+
+extern snk_module_t of_module, ci_module;
extern char __client_start[];
@@ -140,6 +142,14 @@ modules_init(void)
for(i=0; modules[i].name; ++i) {
load_module(modules[i].name);
}
+
+ /* Try to init client-interface module (it's built-in, not loadable) */
+ for(i=0; i<MODULES_MAX; ++i) {
+ if(snk_modules[i] == 0) {
+ snk_modules[i] = cimod_check_and_install();
+ break;
+ }
+ }
}
void