[comp.protocols.tcp-ip] DELUA interface driver needed

cpw%sneezy@LANL.GOV (C. Philip Wood) (08/20/87)

I need a 4.3BSD DELUA driver.  The DEUNA we use currently wedges.
As I understand it, there is no software in the world which will make
it work any better.  So its time to trade up.

-Phil Wood, (cpw@lanl.gov)

templin@DECVAX.DEC.COM (Fred Templin) (08/21/87)

Hi!

The DELUA should be plug-compatible with the 4.3BSD if_de.c driver. I work
with the ULTRIX network drivers, and the only change we've made for DELUA's
is a check in the "deprobe" routine to make sure the board has passed power-
up self test before forcing an interrupt. I don't believe this is done in the
4.3BSD driver, but I really don't see this as being a problem. I'd suggest
just having field service install the DELUA and reboot (but, of course, I
can't be held responsible!) 

Fred L. Templin

( templin@decvax.dec.com )

karels%okeeffe@UCBVAX.BERKELEY.EDU (Mike Karels) (08/21/87)

Here are the changes Donn Seeley put into the 4.3 driver to wait
for self test to complete on DELUA's.  As Fred Templin says, there
really shouldn't be any change required to the DEUNA driver for
use with the DELUA, but the self-test may take longer than the 4.3
driver will wait.

		Mike

*** /nbsd/sys/vaxif/if_de.c	Thu Jun  5 17:02:59 1986
--- if_de.c	Fri Jul 18 17:48:29 1986
***************
*** 5,7 ****
   *
!  *	@(#)if_de.c	7.1 (Berkeley) 6/5/86
   */
--- 5,7 ----
   *
!  *	@(#)if_de.c	7.2 (Berkeley) 7/18/86
   */
***************
*** 125,126 ****
--- 125,142 ----
  
+ 	/*
+ 	 * Make sure self-test is finished before we screw with the board.
+ 	 * Self-test on a DELUA can take 15 seconds (argh).
+ 	 */
+ 	for (i = 0;
+ 	     i < 160 &&
+ 	     (addr->pcsr0 & PCSR0_FATI) == 0 &&
+ 	     (addr->pcsr1 & PCSR1_STMASK) == STAT_RESET;
+ 	     ++i)
+ 		DELAY(100000);
+ 	if ((addr->pcsr0 & PCSR0_FATI) != 0 ||
+ 	    (addr->pcsr1 & PCSR1_STMASK) != STAT_READY)
+ 		return(0);
+ 
+ 	addr->pcsr0 = 0;
+ 	DELAY(100);
  	addr->pcsr0 = PCSR0_RSET;
***************
*** 148,149 ****
--- 164,166 ----
  	register struct dedevice *addr = (struct dedevice *)ui->ui_addr;
+ 	int csr1;
  
***************
*** 155,156 ****
--- 172,186 ----
  	/*
+ 	 * What kind of a board is this?
+ 	 * The error bits 4-6 in pcsr1 are a device id as long as
+ 	 * the high byte is zero.
+ 	 */
+ 	csr1 = addr->pcsr1;
+ 	if (csr1 & 0xff60)
+ 		printf("de%d: broken\n", ui->ui_unit);
+ 	else if (csr1 & 0x10)
+ 		printf("de%d: delua\n", ui->ui_unit);
+ 	else
+ 		printf("de%d: deuna\n", ui->ui_unit);
+ 
+ 	/*
  	 * Reset the board and temporarily map
***************
*** 158,159 ****
--- 188,191 ----
  	 */
+ 	addr->pcsr0 = 0;		/* reset INTE */
+ 	DELAY(100);
  	addr->pcsr0 = PCSR0_RSET;
***************
*** 247,248 ****
--- 279,282 ----
  	addr->pcsr3 = (incaddr >> 16) & 0x3;
+ 	addr->pclow = 0;	/* reset INTE */
+ 	DELAY(100);
  	addr->pclow = CMD_GETPCBB;
***************
*** 298,301 ****
  	ds->ds_if.if_flags |= IFF_RUNNING;
- 	destart(unit);				/* queue output packets */
  	addr->pclow = PCSR0_INTE;		/* avoid interlock */
  	ds->ds_flags |= DSF_RUNNING;		/* need before de_setaddr */
--- 332,335 ----
  	ds->ds_if.if_flags |= IFF_RUNNING;
  	addr->pclow = PCSR0_INTE;		/* avoid interlock */
+ 	destart(unit);				/* queue output packets */
  	ds->ds_flags |= DSF_RUNNING;		/* need before de_setaddr */
***************
*** 741,742 ****
--- 775,779 ----
  		    ds->ds_flags & DSF_RUNNING) {
+ 			((struct dedevice *)
+ 			   (deinfo[ifp->if_unit]->ui_addr))->pclow = 0;
+ 			DELAY(100);
  			((struct dedevice *)

tomlin@hc.DSPO.GOV (Bob Tomlinson) (01/01/88)

in article <8708211505.AA13694@decvax.dec.com>, templin@DECVAX.DEC.COM (Fred Templin) says:
> The DELUA should be plug-compatible with the 4.3BSD if_de.c driver.

It isn't (*exactly*).

>I work
> with the ULTRIX network drivers, and the only change we've made for DELUA's
> is a check in the "deprobe" routine to make sure the board has passed power-
> up self test before forcing an interrupt. I don't believe this is done in the
> 4.3BSD driver, but I really don't see this as being a problem.

It is a problem.  The DELUA takes a LONG time to run its self-check.
On Unibus reset it runs its self-check.  So there are two ways to get it up:
	1) Fix the probe routine to wait until the device is back from self
	   test (or at least DELAY a long time so you're sure it's done with
	   the self check) before trying to get it to interrupt.
or
	2) Boot the kernel by (on a 780)
		B ANY
	   and by the time you can type in the name of your kernel
	   and hit return the DELUA's self check will be done.
	   Of course this isn't convient in a long term, but you can
	   at least get the machine up to go in and fix the source.

bob
-- 
Bob Tomlinson -- tomlin@hc.dspo.gov  --  (505) 667-8495
Los Alamos National Laboratory  --  MEE-10/Data Systems