Date: Thu, 11 Jan 2001 06:41:26 +1100 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: Brian Somers <brian@Awfulhak.org> Cc: Sergey Babkin <babkin@FreeBSD.ORG>, freebsd-arch@FreeBSD.ORG Subject: Re: cvs commit: src/sys/gnu/i386/isa dgb.c dgm.c dgmreg.h dgreg.h Message-ID: <20010111064126.A10214@pc0640.alcatel.com.au> In-Reply-To: <200101052146.f05LkDi49430@hak.lan.Awfulhak.org>; from brian@Awfulhak.org on Fri, Jan 05, 2001 at 09:46:13PM %2B0000 References: <babkin@FreeBSD.org> <200101052146.f05LkDi49430@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 05, 2001 at 09:46:13PM +0000, Brian Somers wrote: >I have the a driver that will replace dgb and dgm and support a bunch >of other digiboards. Now all I need is the time to add back the >{E,}ISA probe routines. There are come significant differences between the [E]ISA aand PCI DigiBoards: - The [E]ISA cards use I/O ports whilst the PCI boards use memory-mapped registers. - The PCI cards have a flat 4MB window. The [E]ISA cards access on-board memory via a 8KB or 32KB window. This means that the code does a lot of checking to see if the card is PCI or not, resulting in expressions like: ((IS_PCI(board_type)) ? *mem[reg] : inb(base + reg)) The Linux driver (maintained by Digi) uses (the equivalent of) virtual functions for all card accesses. Both these approaches add run-time overheads and can adversely affect code legibility. I believe that having separate [E]ISA and PCI drivers would make the code smaller and more understandable as well as reducing overheads (though I can't quantify the latter). There may (and probably are) other drivers that could similarly benefit from having different drivers for different buses. The disadvantages are: - Two drivers sharing common code increases the maintenance load (and the probability that a bug in the common code won't be fixed in both places). - A system with multiple cards on different buses would need several copies of similar drivers. I believe the latter situation is fairly unlikely and can be ignored as a disadvantage. The former is a real problem, but can be (at least partially) offset by sharing source code files between the different drivers. Would it be reasonable to have different drivers for different bus versions of the same card? Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010111064126.A10214>