Subject: Re: LAN adapter driver
To: None <port-dreamcast@netbsd.org>
From: Christian Groessler <cpg@aladdin.de>
List: port-dreamcast
Date: 06/26/2002 22:48:48
A new version of the lan adapter patch is on
ftp://ftp.groessler.org/pub/chris/dreamcast/netbsd/lan-adapter
It also contains the patch to mb86960.c which I already submitted as
kern/17193.

Also there is the main file of the patch, lan_adapter.c, in plain
format (non-patch).

The driver now attachs to the g2 bus.

Jason R Thorpe wrote:

> On Mon, Jun 10, 2002 at 11:25:46PM +0200, Christian Groessler wrote:

> > Hmm, but the g2bus_bus_mem.c doesn't do this regaddr*4 thingy. How
> > will should it work?

> One option is for your machine-dependent front-end to the 86960 driver
> to create its down bus_space_tag which inherits much of the G2 space tag,
> but overrides the space access methods as necessary.  There is some precedence
> for this in other NetBSD ports which have similar issues.

Can you give some examples?

In the mean time I did it the following way: The lana_match and
lana_detect functions memcpy the bus_space_tag they got from the g2
bus driver to local storage, and replace some entries with local
routines. The local routines adapt the offset and chain to the
original g2 routines.

regards,
chris