Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Sep 1998 00:12:28 +0200
From:      Stefan Esser <se@mi.uni-koeln.de>
To:        Hallam Oaks P/L list account <mlnn4@oaks.com.au>, "freebsd-hackers@FreeBSD.ORG" <freebsd-hackers@FreeBSD.ORG>
Cc:        Stefan Esser <se@mi.uni-koeln.de>
Subject:   Re: 'struct isa_device' advice sought
Message-ID:  <19980917001228.C355@mi.uni-koeln.de>
In-Reply-To: <199809161224.WAA22191@mail.aussie.org>; from Hallam Oaks P/L list account on Wed, Sep 16, 1998 at 10:24:39PM %2B1000
References:  <199809161224.WAA22191@mail.aussie.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1998-09-16 22:24 +1000, Hallam Oaks P/L list account <mlnn4@oaks.com.au> 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



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