From owner-freebsd-isdn Sat Aug 1 00:18:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA12732 for freebsd-isdn-outgoing; Sat, 1 Aug 1998 00:18:42 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from linteuto.teuto.de (linteuto.teuto.de [194.77.23.26]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA12727 for ; Sat, 1 Aug 1998 00:18:39 -0700 (PDT) (envelope-from martin@rumolt.teuto.de) Received: from rumolt.teuto.de (root@rumolt.teuto.de [194.77.23.161]) by linteuto.teuto.de (8.8.7/8.8.7) with ESMTP id JAA27244; Sat, 1 Aug 1998 09:18:30 +0200 Received: (from martin@localhost) by rumolt.teuto.de (8.8.8/8.8.7) id IAA04870; Sat, 1 Aug 1998 08:59:19 +0200 (MEST) From: Martin Husemann Message-Id: <199808010659.IAA04870@rumolt.teuto.de> Subject: Re: Preparations for BSD/OS port To: bert_driehuis@nl.compuware.com (Bert Driehuis) Date: Sat, 1 Aug 1998 08:59:18 +0200 (MEST) Cc: freebsd-isdn@FreeBSD.ORG In-Reply-To: <35C1BA3B.19A3A3B8@nl.compuware.com> from "Bert Driehuis" at Jul 31, 98 02:36:11 pm Organization: Crusaders Catering Services Inc. X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > One that springs to mind is the type of > the second argument to the ioctl driver routine: on NetBSD it's an int, on > FreeBSD and BSD/OS it's a u_long. This is a good example. This code has always been wrong on NetBSD, but noone noticed (and it worked). Then someone changed the type for newer FreeBSD versions and let NetBSD use the old code. In fact it has been u_long for quite some time in NetBSD. > Another, along the lines of the FLAGS definition in layer1/i4b_isic.c, is to > use a #define PARMS to pass the right info down to the probe and attach > routines (I should check my current sources to see if I still need those extra > arguments for BSD/OS, but for the sake of argument let's assume it is still > needed). This might be usefull, but remember: attach and probe semantics are completely different and I don't see them coming closer together any time soon. So to clean up this mess it might be usefull to separate them completely. > For example, > the tel_s0163_probe in i4b_tel_s0163.c is defined now in two and soon three > radically different ifdeffed routines, with the guts of the probe duplicated > two or three times. Sometime ago we had a common include file for all the 16.3 based cards which used some generic macros to create the individual driver functions. Don't know why it was removed... I think a real worth amount of cleanup would happen if we would unify the parameters passed to the card specific drivers. The FreeBSD port should simply adopt the much more general sheme used for NetBSD now. We could try to make some compatibility no-op "bus_space" macros and may be done with all the #ifdef's in that part - besides probe and attach, due to the semantic differences there. Martin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message