From owner-freebsd-bugs Sun Nov 23 09:50:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA21137 for bugs-outgoing; Sun, 23 Nov 1997 09:50:04 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA21131; Sun, 23 Nov 1997 09:50:01 -0800 (PST) (envelope-from gnats) Resent-Date: Sun, 23 Nov 1997 09:50:01 -0800 (PST) Resent-Message-Id: <199711231750.JAA21131@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, volf@oasis.IAEhv.nl Received: from news.IAEhv.nl (root@news.IAEhv.nl [194.151.64.4]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id JAA20982 for ; Sun, 23 Nov 1997 09:47:16 -0800 (PST) (envelope-from volf@oasis.IAEhv.nl) Received: from oasis.IAEhv.nl (uucp@localhost) by news.IAEhv.nl (8.6.13/1.63) with IAEhv.nl; pid 18000 on Sun, 23 Nov 1997 17:47:12 GMT; id RAA18000 efrom: volf@oasis.IAEhv.nl; eto: freebsd.org!freebsd-gnats-submit Received: from LOCAL (volf@localhost) by oasis.IAEhv.nl (8.8.8/1.63); pid 3668 on Sun, 23 Nov 1997 17:43:43 GMT; id RAA03668 efrom: volf; eto: UNKNOWN Message-Id: <199711231743.RAA03668@oasis.IAEhv.nl> Date: Sun, 23 Nov 1997 17:43:43 GMT From: volf@oasis.IAEhv.nl (Frank Volf) Reply-To: volf@oasis.IAEhv.nl To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: volf@oasis.IAEhv.nl X-Send-Pr-Version: 3.2 Subject: kern/5133: ncrcontrol version mismatch Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 5133 >Category: kern >Synopsis: ncrcontrol version mismatch >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 23 09:50:00 PST 1997 >Last-Modified: >Originator: Frank Volf >Organization: Frank Volf's private UUCP site, Eindhoven, the Netherlands >Release: FreeBSD 2.2.2-RELEASE i386 >Environment: FreeBSD oasis.IAEhv.nl 2.2.2-RELEASE FreeBSD 2.2.2-RELEASE #1: Wed Nov 19 14:34:41 MET 1997 volf@oasis.IAEhv.nl:/new/usr/src/sys/compile/OASIS i386 >Description: Kernel compilation with option FAILSAFE changes the size of the internal data structures of the ncr driver. To be precise MAX_START is different for kernels compiled with and without FAILSAFE. MAX_START is used in the ncb struct, so this structure has a different size for kernels with and without FAILSAFE. Unfortunately, the size of this struct is used to calculate the "ncr version" (as strored in the const ncr_version), which is calculated as static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 + (u_long) sizeof (struct ccb) * 5 + (u_long) sizeof (struct lcb) * 3 + (u_long) sizeof (struct tcb) * 2; in ncr.c A problem arises when compiling the ncrcontrol.c program. This program (correctly) checks if the kernel ncr version is equal to the ncr version with which this program is build. Unfortunately, the FAILSAFE option is not passed to the cc command line compiling ncrcontrol.c, thus the ncrcontrol program will *always* complain about the version mismatch when used with a "FAILSAFE" kernel. Adding -DFAILSAFE to the CFLAGS in the Makefile fixes the problem for me, but that is of course very undesirable solution. Currently, I don't see a clean way to solve this problem, other than always using the same datastructures (and thus waste a few bytes when FAILSAFE is specified). BTW: I only looked at the 2.2.2 kernel code, I don't know if this is fixed in current. Frank >How-To-Repeat: >Fix: >Audit-Trail: >Unformatted: