Subject: Re: NCR 5380 driver questions
To: Ruschmeyer, John <jruschme@att.com>
From: Stefan Grefen <grefen@hprc.tandem.com>
List: port-i386
Date: 09/17/1998 20:24:49
In message <199809171534.LAA17282@gab200r1.ems.att.com>  "Ruschmeyer, John" wrote:
> This is starting to sound like a *much* bigger problem than I originally
> figured on, particularly since it seems that the majority of ISA 5380-based
> adapters seem to be port-mapped rather than memory mapped.

I think its not that bad. you can replace the structure access by
bus_space_read_[1,2,3,4](bus_tag, bus_handle,offsetof(struct xx,member));
and so on. This should be faster then porting the FreeBSD driver,
there are some subtle gotchas.

> 
> From the looks of it, the big issue is bus_space()ifying the MI driver.
> This, of course, affects both the Sun3 and Mac68k ports. (It looks as though
> the Atari and Amiga both use private drivers.)

This has to be done anyway. A 'good' NetBSD is bus_space()ified.
(else your old card wouldn't work on a Alpha or pc583 :-))

> 
> This leaves the alternatives of using a "private" bus_space()ified version
> of the MI driver (which I'm concerned may be beyond my current reach) or of
> ignoring the whole MI issue (which seems like a "bad thing") and trying to
> direct port the FreeBSD 2.2-STABLE driver.

I think its less work than you think. The bus_space stuff is no black-magic
on a PC a bus_space_read_1(bus_tag, bus_handle, offset);
is equivalent to 'inb(bus_handle+offset)'.

Stefan

> 
> On an ironic note, the same time I read your letter, a friend forwarded me
> some notes about the lack of a 5380 driver in the FreeBSD CAM SCSI layer.
> 
> <<<John>>>
> 
> "One World, One Web, One Program" - Microsoft Promotional Ad
> "Ein Volk, Ein Reich, Ein Fuhrer" - Adolf Hitler
> 
--
Stefan Grefen                                Tandem Computers Europe Inc.
grefen@hprc.tandem.com                       High Performance Research Center
 --- Hacking's just another word for nothing left to kludge. ---