Digiboard PCI Xem driver

Peter Jeremy peter.jeremy at alcatel.com.au
Tue May 18 19:45:01 PDT 2004


On 2004-May-13 06:10:57 +0300, Lefteris Tsintjelis <lefty at ene.asda.gr> wrote:
>Peter Jeremy wrote:
>
>> "struct thread"s back to "struct proc", fix the cdevsw initialisation
>> and change the kld load path).

If you look at the digi.c source just after it was imported, the
cdevsw initialisation is almost correct for 4.x (the last three
entries should be "D_TTY | D_KQFILTER, -1, ttykqfilter" but one
is missing from memory).

>digi.o: In function `digi_loadmoduledata':
>digi.o(.text+0x19bf): undefined reference to `linker_reference_module'

Look in an old version of digi.c (cut-and-paste so beware whitespace):
@@ -1027,17 +1081,18 @@
        KASSERT(sc->link.data == NULL, ("Uninitialised LINK variable"));
        KASSERT(sc->module != NULL, ("Uninitialised module name"));
 
+       /*-
+        * XXX: It'd be nice to have something like linker_search_path()
+        *      here.  For the moment we hardcode things - the comments
+        *      in linker_load_module() before the call to
+        *      linker_search_path() suggests that ``there will be a
+        *      system...''.
+        */
        modlen = strlen(sc->module);
-       modfile = malloc(modlen + 6, M_TEMP, M_WAITOK);
-       snprintf(modfile, modlen + 6, "digi_%s", sc->module);
-       if ((res = linker_reference_module(modfile, NULL, &lf)) != 0) {
-               if (res == ENOENT && rootdev == NODEV)
-                       printf("%s: Failed to autoload module: No filesystem\n",
-                           modfile);
-               else
-                       printf("%s: Failed %d to autoload module\n", modfile,
-                           res);
-       }
+       modfile = malloc(modlen+18, M_TEMP, M_WAITOK);
+       snprintf(modfile, modlen+18, "/modules/digi_%s.ko", sc->module);
+       if ((res = linker_load_file(modfile, &lf)) != 0)
+               printf("%s: Failed %d to load module\n", modfile, res);
        free(modfile, M_TEMP);
        if (res != 0)
                return (res);

>> Unfortunately, no-one seems interested in officially back-porting it 
>> to -stable - and I can't see it happening at all now.
>
>Back porting it, seems pretty simple and straight forward...

The 4.x branch is now very close to being dead and it would be difficult
to justify the effort now.

-- 
Peter Jeremy


More information about the freebsd-stable mailing list