Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Aug 2005 22:08:03 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        michael.honeyfield@gmail.com
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: driver versions
Message-ID:  <20050815.220803.39156812.imp@bsdimp.com>
In-Reply-To: <16d2d7370508151541683c9fc6@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

In message: <16d2d7370508151541683c9fc6@mail.gmail.com>
            Michael Honeyfield <michael.honeyfield@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


home | help

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