From owner-freebsd-hackers Wed Sep 16 15:15:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA21709 for freebsd-hackers-outgoing; Wed, 16 Sep 1998 15:15:06 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from Sisyphos.MI.Uni-Koeln.DE (Sisyphos.MI.Uni-Koeln.DE [134.95.212.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA21540 for ; Wed, 16 Sep 1998 15:14:29 -0700 (PDT) (envelope-from se@dialup124.zpr.uni-koeln.de) Received: from dialup124.zpr.Uni-Koeln.DE (dialup124.zpr.Uni-Koeln.DE [134.95.219.124]) by Sisyphos.MI.Uni-Koeln.DE (8.8.7/8.8.7) with ESMTP id AAA20351; Thu, 17 Sep 1998 00:14:01 +0200 (MET DST) Received: (from se@localhost) by dialup124.zpr.Uni-Koeln.DE (8.8.8/8.6.9) id AAA00474; Thu, 17 Sep 1998 00:12:28 +0200 (CEST) X-Face: " Date: Thu, 17 Sep 1998 00:12:28 +0200 From: Stefan Esser To: Hallam Oaks P/L list account , "freebsd-hackers@FreeBSD.ORG" Cc: Stefan Esser Subject: Re: 'struct isa_device' advice sought Mail-Followup-To: Hallam Oaks P/L list account , "freebsd-hackers@FreeBSD.ORG" References: <199809161224.WAA22191@mail.aussie.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: <199809161224.WAA22191@mail.aussie.org>; from Hallam Oaks P/L list account on Wed, Sep 16, 1998 at 10:24:39PM +1000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 1998-09-16 22:24 +1000, Hallam Oaks P/L list account wrote: > Hello; > > I'm implementing a PCI device interface for an ISDN card. The interface has > the normal pci/ dir support code (this is already done so is not an issue). > > The main driver, however, is the i4b ISDN code, and this is where I'm running > into trouble (despite appearances, this is not an ISDN-specific posting). > > The particular i4b code that I need to deal with assumes that the card it's > working with is ISA, and as such makes liberal use of isa_device structs as > parameters to functions, etc. I converted the "ed" (NE2000) and "lnc" (Lance) Ethernet drivers to support both ISA and PCI cards, more than 2 years ago. You may want to check out my patches from the CVS repository: /sys/i386/isa/if_ed.c (1.97 -> 1.99) /sys/i386/isa/if_lnc.c (1.23 -> 1.25). > To make this work with the PCI card, I'd have to either extensively modify > this code (possible but not desirable), or init an isa_device structure and > pretend that the PCI card is an ISA device (at least insofar as the i4b code > is concerned). The changes necessary to the i4b code to make this work would > not be so major - it would be aware of the PCI-ness of the card where it > mattered, but otherwise not. I replaced the array indexed by unit with softc structs addressed by pointers. The code became shorter and simpler in a lot of places ... > My question is this : is the concept of a PCI card masquerading (in a limited > sense) as an ISA one a legitimate approach ? Is it likely to cause problems ? > I know it's a kludge but the alternative is also not particularly desirable. It was very simple to just do away with the isa_device structure, except for the ISA probe/attach code. I'll be happy to support you (I'm a user of the i4b ISDN code myself, and my next system most probably will have a PCI ISDN card ;-), but may need up to one or two weeks to reply (sorry). Regards, STefan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message