Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Aug 1998 08:59:18 +0200 (MEST)
From:      Martin Husemann <martin@rumolt.teuto.de>
To:        bert_driehuis@nl.compuware.com (Bert Driehuis)
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: Preparations for BSD/OS port
Message-ID:  <199808010659.IAA04870@rumolt.teuto.de>
In-Reply-To: <35C1BA3B.19A3A3B8@nl.compuware.com> from "Bert Driehuis" at Jul 31, 98 02:36:11 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



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