Subject: Re: BOCA - ioAT66 driver for NetBSD-1.3 (long)
To: Lucio de Re <>
From: Curt Sampson <>
List: tech-kern
Date: 01/08/1998 15:20:02
On Wed, 7 Jan 1998, Lucio de Re wrote:

> BOCA make a very poorly documented unintelligent serial card, they call 
> the ioAT66, with six 16550-look-alike UARTS.
> I have modified the existing BOCA driver for this particular card...

Yes, I hacked this up a while back too. Unfortunately this was as
the 1.3 release process was starting, so I've not had a chance to
clean it up and put it in.

And yes, you are right, it is a quirky board. And the docs did have
the interrupt status bit values reversed.

However, you've gone a little too far when it comes to configuring
this board, because you're trying to have the bocasix driver (at
least that's what I called it) deal with configurations that the
standard com driver already deals with! Use the regular com driver
to deal with ports that use non-shared interrupts, and then let
the boca take care of the remainder that use a shared interrupt.
I'd suggest it work like this:

bocasix0 at isa? port 0x208 irq 5       # BOCA 6-port serial cards
com* at bocasix? slave?

The address given is the address of the interrupt status register
(either 208 or 2f0) and the irq is the shared irq (4 or 5). The
probe for each slave will then try first the port in the 220-268
address range and, if that fails, the alternate address:

		1st	2nd
	slave	try	try

	0	220	3f8
	1	228	2f8
	2	240	3e8
	3	248	2e8
	4	260	3e0
	5	268	2e0

If the the particular port is configured by the user for a non-shared
interrupt (both with the jumper on the board and a `comN at isa?
port 0x3e0 irq 12' or whatever in the config file) the bocasix
attempt at port allocation will fail.

So for a complex example, if you wanted to use the one of the
on-board serial ports on your computer and also two of these boards
(but only 4 ports from the second board, since one will conflict
with your on-board I/O), you've got two options. One is to use
entirely non-shared interrupts for the second board, assuming you've
got them free:

	com0    at isa? port 0x3f8 irq 4        # standard PC serial ports
	com1    at isa? port 0x2f8 irq 3
	com8	at isa? port 0x3e8 irq 10	# 2nd ioat66
	com9	at isa? port 0x2e8 irq 11	# 2nd ioat66
	com10	at isa? port 0x3e0 irq 12	# 2nd ioat66
	com11	at isa? port 0x2e0 irq 15	# 2nd ioat66
	bocasix0 at isa? port 0x208 irq 5       # 1st ioat66
	com* at bocasix? slave?

And the other option is to disable your on-board serial ports and
use both bocas in shared interrupt mode:

	bocasix0 at isa? port 0x208 irq 5       # 1st ioat66
	bocasix1 at isa? port 0x2f0 irq 4       # 2nd ioat66
	com* at bocasix? slave?

You could get even weirder and keep using your second (but not your
first) on-board serial port; you might do this if you needed a
modem control signal for one port that wasn't available on the Boca:

	com1 at isa? port 0x2f8 irq 3		# 2nd on-board serial port
	bocasix0 at isa? port 0x208 irq 5       # 1st ioat66
	bocasix1 at isa? port 0x2f0 irq 4       # 2nd ioat66
	com* at bocasix? slave?

Not that I've tested any of this, of course. :-) But I'll be happy
to do the work on this and commit it if you can wait a few weeks
for the card I have to come out of a production machine.


Curt Sampson	   Info at
Internet Portal Services, Inc.	   Through infinite mist, software reverberates
Vancouver, BC  (604) 257-9400	   In code possess'd of invisible folly.