driver versions

M. Warner Losh imp at bsdimp.com
Tue Aug 16 04:08:04 GMT 2005


In message: <16d2d7370508151541683c9fc6 at mail.gmail.com>
            Michael Honeyfield <michael.honeyfield at gmail.com> writes:
: Hello,
: 
: I seem to be having issues with driver versions in the driver I am
: working with.
: 
: When I load the kernel module, I get the following:
: 
: WARNING: Device driver "dag" has wrong version and is disabled. 
: Recompile KLD module.
: 
: Yes, I have defined the version like so:
: 
: MODULE_VERSION(dag, 0);
: 
: I poked around and it seems to me that the version *has* to be 0 at
: this time as per sys/conf.h.
: 
: I am using FreeBSD 5.4. 
: 
: Am I missing something? 

Yes.  MODULE_VERSION has nothing to do with the warning that you are
getting.  That warning is coming from your device registration.  You
need to have something like:

static struct cdevsw lpt_cdevsw = {
	.d_version =	D_VERSION,
	.d_flags =	D_NEEDGIANT,
}

in it.

MODULE_VERSION is the version of the entire module, for external
linking to that module.

Warner


More information about the freebsd-drivers mailing list