From owner-cvs-all Mon Jun 21 2:36:27 1999 Delivered-To: cvs-all@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 6E5BC14C13; Mon, 21 Jun 1999 02:36:18 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id KAA98328; Mon, 21 Jun 1999 10:37:27 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Mon, 21 Jun 1999 10:37:27 +0100 (BST) From: Doug Rabson To: Peter Wemm Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/isa sio.c In-Reply-To: <19990621071211.988BB75@overcee.netplex.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Mon, 21 Jun 1999, Peter Wemm wrote: > Doug Rabson wrote: > > On Sun, 20 Jun 1999, Peter Wemm wrote: > > > > > peter 1999/06/20 06:10:11 PDT > > > > > > Modified files: > > > sys/isa sio.c > > > Log: > > > Use the proper interfaces to find if a device is enabled, don't dig into > > > the bus mechanism's private internals! > > > > Well spotted. For future reference, bus_private.h may not be included by > > any drivers. Any driver which includes this header should be considered > > broken. > > Well, I wouldn't go quite that far.. Usually this would be the case, the > whole point of the bus interface system is to avoid structures for this > sort of thing and diving in severely impairs binary upwards compatability. > If a driver or bus genuinely *does* need to get to the internals, then > either the programmer is attacking the problem the wrong way or the public > interfaces are inadequate. For actual bus devices, it is not all that > unlikely that there are weaknesses. I would rather that people tackle these weaknesses by asking me how to solve their problem or by suggesting new functionality for the 'approved' api. I really think its a bad idea for drivers to use bus_private.h at all. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message