Subject: Re: How about to config Hayes ESP with glue device rather than magical option?
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: enami tsugutomo <enami@but-b.or.jp>
List: current-users
Date: 09/08/1997 08:08:02
Jason Thorpe <thorpej@nas.nasa.gov> writes:

>  > Currently, Hayes ESP in ns16550 compat mode is configured by magical
>  > option COM_HAYESP.  But I would like to do it by adding glue device
>  > specifing actual locater, i.e. write in config file like this:
>  > 
>  >        hayesp0	at isa? port 0x280 irq 5
>  >        com*	at hayesp? port 0x3e8
> 
> sounds great, but please change the name to "hayesesp" :-)

Ok, I wrote a patch to do this learning from commulti, with giving the
name hayesesp.  Though there is few point I'm wondering how to do, but
it seems to work for me as follows:

isa0 at pcib0
hayesesp0 at isa0 port 0x280-0x287 irq 5
com3 at hayesesp0 port 0x3e8-0x3f0: 1024 byte fifo
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7

The point I'm wondering is:

(1) `com at isa' disables FIFO when system shutdown, but `com at
multi' doesn't.  For Hayes ESP, it did since it was same as `com at
isa', but is it actually needed?  In my case, it works without it but
since the comment says that it depends on BIOS, I can't say it is
unnecessary.  Then, why it doesn't need for multi-port card?  Does it
need for on board one?

(2) Is it overwork that spliting the driver for ISA only card (I mean
Hayes ESP:-) into bus dependent/independent part?  (but hayespreg.h is
in dev/ic ...)


Anyway, since now it works, before sending it as PR, could someone
else please test it and tell me the result if you have a card?  Or,
any other comment reading the source is also welcome.  I've put it at
the following location:

	ftp://ftp.but-b.or.jp/pub/enami/hayesesp-1997Sep08.diff

Sample config file entry is here:

hayesesp0 at isa? port 0x280 irq 5	# Hayes ESP serial cards with ns16550
com*	at hayesesp? port ?		# compatible mode.
#com*	at hayesesp? port 0x3e8		# hardwiring port address.

Note that this patch doesn't include the patch to use the card over
115200 bps, since it is separate function.

Thanks.

enami.