Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2004 10:00:43 +1000
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        Lefteris Tsintjelis <lefty@ene.asda.gr>
Cc:        stable@freebsd.org
Subject:   Re: Digiboard PCI Xem driver
Message-ID:  <20040519000043.GA79139@gsmx07.alcatel.com.au>
In-Reply-To: <40A2E741.40ABFD0E@ene.asda.gr>
References:  <40A0C3FC.2CDCA39D@ene.asda.gr> <20040511211714.GO95736@gsmx07.alcatel.com.au> <40A2E741.40ABFD0E@ene.asda.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-May-13 06:10:57 +0300, Lefteris Tsintjelis <lefty@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040519000043.GA79139>