Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!rutgers!ames!ucbcad!ucbvax!UCBVAX.BERKELEY.EDU!karels%okeeffe From: karels%okeeffe@UCBVAX.BERKELEY.EDU (Mike Karels) Newsgroups: comp.protocols.tcp-ip Subject: Re: DELUA interface driver needed Message-ID: <8708211920.AA05016@okeeffe.Berkeley.EDU> Date: Fri, 21-Aug-87 15:20:17 EDT Article-I.D.: okeeffe.8708211920.AA05016 Posted: Fri Aug 21 15:20:17 1987 Date-Received: Sun, 23-Aug-87 02:46:59 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 97 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 *)