1*6207Swnj /* if_en.c 4.40 82/03/15 */ 24686Swnj 34686Swnj #include "en.h" 45105Swnj 54686Swnj /* 65105Swnj * Xerox prototype (3 Mb) Ethernet interface driver. 74686Swnj */ 84686Swnj 94686Swnj #include "../h/param.h" 104686Swnj #include "../h/systm.h" 114686Swnj #include "../h/mbuf.h" 124686Swnj #include "../h/pte.h" 134686Swnj #include "../h/buf.h" 145083Swnj #include "../h/protosw.h" 155083Swnj #include "../h/socket.h" 164686Swnj #include "../h/ubareg.h" 174686Swnj #include "../h/ubavar.h" 184686Swnj #include "../h/enreg.h" 195083Swnj #include "../h/cpu.h" 204686Swnj #include "../h/mtpr.h" 215083Swnj #include "../h/vmmac.h" 225083Swnj #include "../net/in.h" 235083Swnj #include "../net/in_systm.h" 245083Swnj #include "../net/if.h" 255083Swnj #include "../net/if_en.h" 265083Swnj #include "../net/if_uba.h" 275083Swnj #include "../net/ip.h" 285083Swnj #include "../net/ip_var.h" 296027Ssam #include "../net/pup.h" 304686Swnj 315213Swnj #define ENMTU (1024+512) 325083Swnj 334686Swnj int enprobe(), enattach(), enrint(), enxint(), encollide(); 344686Swnj struct uba_device *eninfo[NEN]; 354686Swnj u_short enstd[] = { 0 }; 364686Swnj struct uba_driver endriver = 375171Swnj { enprobe, 0, enattach, 0, enstd, "en", eninfo }; 384686Swnj #define ENUNIT(x) minor(x) 394686Swnj 405105Swnj int eninit(),enoutput(),enreset(); 415105Swnj 425105Swnj /* 435105Swnj * Ethernet software status per interface. 445105Swnj * 455105Swnj * Each interface is referenced by a network interface structure, 465105Swnj * es_if, which the routing code uses to locate the interface. 475105Swnj * This structure contains the output queue for the interface, its address, ... 485105Swnj * We also have, for each interface, a UBA interface structure, which 495105Swnj * contains information about the UNIBUS resources held by the interface: 505105Swnj * map registers, buffered data paths, etc. Information is cached in this 515105Swnj * structure for use by the if_uba.c routines in running the interface 525105Swnj * efficiently. 535105Swnj */ 545083Swnj struct en_softc { 555105Swnj struct ifnet es_if; /* network-visible interface */ 565105Swnj struct ifuba es_ifuba; /* UNIBUS resources */ 575105Swnj short es_delay; /* current output delay */ 585105Swnj short es_mask; /* mask for current output delay */ 595105Swnj u_char es_lastx; /* host last transmitted to */ 605105Swnj short es_oactive; /* is output active? */ 615105Swnj short es_olen; /* length of last output */ 625083Swnj } en_softc[NEN]; 634686Swnj 645105Swnj /* 655105Swnj * Do output DMA to determine interface presence and 665105Swnj * interrupt vector. DMA is too short to disturb other hosts. 675105Swnj */ 684686Swnj enprobe(reg) 694686Swnj caddr_t reg; 704686Swnj { 715171Swnj register int br, cvec; /* r11, r10 value-result */ 724686Swnj register struct endevice *addr = (struct endevice *)reg; 734686Swnj 745083Swnj COUNT(ENPROBE); 754686Swnj #ifdef lint 764686Swnj br = 0; cvec = br; br = cvec; 774922Swnj enrint(0); enxint(0); encollide(0); 784686Swnj #endif 794686Swnj addr->en_istat = 0; 804686Swnj addr->en_owc = -1; 814686Swnj addr->en_oba = 0; 824771Swnj addr->en_ostat = EN_IEN|EN_GO; 834686Swnj DELAY(100000); 844686Swnj addr->en_ostat = 0; 854686Swnj return (1); 864686Swnj } 874686Swnj 885105Swnj /* 895105Swnj * Interface exists: make available by filling in network interface 905105Swnj * record. System will initialize the interface when it is ready 915105Swnj * to accept packets. 925105Swnj */ 934686Swnj enattach(ui) 944686Swnj struct uba_device *ui; 954686Swnj { 965105Swnj register struct en_softc *es = &en_softc[ui->ui_unit]; 975105Swnj COUNT(ENATTACH); 984688Swnj 995105Swnj es->es_if.if_unit = ui->ui_unit; 1005171Swnj es->es_if.if_name = "en"; 1015105Swnj es->es_if.if_mtu = ENMTU; 1025105Swnj es->es_if.if_net = ui->ui_flags; 1035105Swnj es->es_if.if_host[0] = 1045213Swnj (~(((struct endevice *)eninfo[ui->ui_unit]->ui_addr)->en_addr)) & 0xff; 1055294Sroot #ifdef ENKLUDGE 1065294Sroot if (es->es_if.if_net == 10) { 1075294Sroot es->es_if.if_host[0] <<= 16; 1085294Sroot es->es_if.if_host[0] |= 0x4e; 1095294Sroot } 1105294Sroot #endif 1115105Swnj es->es_if.if_addr = 1125105Swnj if_makeaddr(es->es_if.if_net, es->es_if.if_host[0]); 1136087Sroot es->es_if.if_broadaddr = 1146087Sroot if_makeaddr(es->es_if.if_net, 0); 1155171Swnj es->es_if.if_init = eninit; 1165105Swnj es->es_if.if_output = enoutput; 1175105Swnj es->es_if.if_ubareset = enreset; 1185696Sroot es->es_ifuba.ifu_flags = UBA_NEEDBDP | UBA_NEED16; 1195160Swnj if_attach(&es->es_if); 1204686Swnj } 1214686Swnj 1225105Swnj /* 1235105Swnj * Reset of interface after UNIBUS reset. 1245105Swnj * If interface is on specified uba, reset its state. 1255105Swnj */ 1265105Swnj enreset(unit, uban) 1275105Swnj int unit, uban; 1285105Swnj { 1295105Swnj register struct uba_device *ui; 1305105Swnj COUNT(ENRESET); 1315105Swnj 1325171Swnj if (unit >= NEN || (ui = eninfo[unit]) == 0 || ui->ui_alive == 0 || 1335171Swnj ui->ui_ubanum != uban) 1345105Swnj return; 1355171Swnj printf(" en%d", unit); 1365105Swnj eninit(unit); 1375105Swnj } 1385105Swnj 1395105Swnj /* 1405105Swnj * Initialization of interface; clear recorded pending 1415105Swnj * operations, and reinitialize UNIBUS usage. 1425105Swnj */ 1434688Swnj eninit(unit) 1444686Swnj int unit; 1455083Swnj { 1465171Swnj register struct en_softc *es = &en_softc[unit]; 1475171Swnj register struct uba_device *ui = eninfo[unit]; 1484686Swnj register struct endevice *addr; 1495105Swnj int s; 1504686Swnj 1515105Swnj if (if_ubainit(&es->es_ifuba, ui->ui_ubanum, 1525708Sroot sizeof (struct en_header), (int)btoc(ENMTU)) == 0) { 1535171Swnj printf("en%d: can't initialize\n", unit); 1545083Swnj return; 1554686Swnj } 1564686Swnj addr = (struct endevice *)ui->ui_addr; 1575083Swnj addr->en_istat = addr->en_ostat = 0; 1584686Swnj 1595105Swnj /* 1605171Swnj * Hang a receive and start any 1615171Swnj * pending writes by faking a transmit complete. 1625105Swnj */ 1635105Swnj s = splimp(); 1645171Swnj addr->en_iba = es->es_ifuba.ifu_r.ifrw_info; 1655171Swnj addr->en_iwc = -(sizeof (struct en_header) + ENMTU) >> 1; 1665171Swnj addr->en_istat = EN_IEN|EN_GO; 1675171Swnj es->es_oactive = 1; 1685105Swnj enxint(unit); 1695105Swnj splx(s); 1704686Swnj } 1714686Swnj 1724717Swnj int enlastdel = 25; 1735083Swnj 1745105Swnj /* 1755105Swnj * Start or restart output on interface. 1765105Swnj * If interface is already active, then this is a retransmit 1775105Swnj * after a collision, and just restuff registers and delay. 1785105Swnj * If interface is not already active, get another datagram 1795105Swnj * to send off of the interface queue, and map it to the interface 1805105Swnj * before starting the output. 1815105Swnj */ 1824688Swnj enstart(dev) 1834686Swnj dev_t dev; 1844686Swnj { 1855171Swnj int unit = ENUNIT(dev); 1865171Swnj struct uba_device *ui = eninfo[unit]; 1875171Swnj register struct en_softc *es = &en_softc[unit]; 1885083Swnj register struct endevice *addr; 1895083Swnj struct mbuf *m; 1905083Swnj int dest; 1914688Swnj COUNT(ENSTART); 1924686Swnj 1935083Swnj if (es->es_oactive) 1945083Swnj goto restart; 1955105Swnj 1965105Swnj /* 1975105Swnj * Not already active: dequeue another request 1985105Swnj * and map it to the UNIBUS. If no more requests, 1995105Swnj * just return. 2005105Swnj */ 2015105Swnj IF_DEQUEUE(&es->es_if.if_snd, m); 2025083Swnj if (m == 0) { 2035083Swnj es->es_oactive = 0; 2044686Swnj return; 2054686Swnj } 2065213Swnj dest = mtod(m, struct en_header *)->en_dhost; 2075105Swnj es->es_olen = if_wubaput(&es->es_ifuba, m); 2085105Swnj 2095105Swnj /* 2105105Swnj * Ethernet cannot take back-to-back packets (no 2115105Swnj * buffering in interface. To avoid overrunning 2125105Swnj * receiver, enforce a small delay (about 1ms) in interface 2135105Swnj * on successive packets sent to same host. 2145105Swnj */ 2155083Swnj if (es->es_lastx && es->es_lastx == dest) 2165083Swnj es->es_delay = enlastdel; 2175083Swnj else 2185083Swnj es->es_lastx = dest; 2195105Swnj 2205083Swnj restart: 2215105Swnj /* 2225105Swnj * Have request mapped to UNIBUS for transmission. 2235105Swnj * Purge any stale data from this BDP, and start the otput. 2245105Swnj */ 2255105Swnj UBAPURGE(es->es_ifuba.ifu_uba, es->es_ifuba.ifu_w.ifrw_bdp); 2264686Swnj addr = (struct endevice *)ui->ui_addr; 2275160Swnj addr->en_oba = (int)es->es_ifuba.ifu_w.ifrw_info; 2285083Swnj addr->en_odelay = es->es_delay; 2295083Swnj addr->en_owc = -((es->es_olen + 1) >> 1); 2304771Swnj addr->en_ostat = EN_IEN|EN_GO; 2315083Swnj es->es_oactive = 1; 2324686Swnj } 2334686Swnj 2345105Swnj /* 2355105Swnj * Ethernet interface transmitter interrupt. 2365105Swnj * Start another output if more data to send. 2375105Swnj */ 2384686Swnj enxint(unit) 2394686Swnj int unit; 2404686Swnj { 2415171Swnj register struct uba_device *ui = eninfo[unit]; 2425171Swnj register struct en_softc *es = &en_softc[unit]; 2434686Swnj register struct endevice *addr; 2444686Swnj COUNT(ENXINT); 2454686Swnj 2465083Swnj if (es->es_oactive == 0) 2475083Swnj return; 2484686Swnj addr = (struct endevice *)ui->ui_addr; 2495171Swnj es->es_if.if_opackets++; 2505083Swnj es->es_oactive = 0; 2515083Swnj es->es_delay = 0; 2525083Swnj es->es_mask = ~0; 2535275Swnj if (addr->en_ostat&EN_OERROR) { 2545275Swnj es->es_if.if_oerrors++; 2555213Swnj printf("en%d: output error\n", unit); 2565275Swnj } 2575696Sroot if (es->es_ifuba.ifu_xtofree) { 2585696Sroot m_freem(es->es_ifuba.ifu_xtofree); 2595696Sroot es->es_ifuba.ifu_xtofree = 0; 2605696Sroot } 2615105Swnj if (es->es_if.if_snd.ifq_head == 0) { 2625083Swnj es->es_lastx = 0; 2634686Swnj return; 2644686Swnj } 2655083Swnj enstart(unit); 2664686Swnj } 2674686Swnj 2685105Swnj /* 2695105Swnj * Collision on ethernet interface. Do exponential 2705105Swnj * backoff, and retransmit. If have backed off all 2715105Swnj * the way printing warning diagnostic, and drop packet. 2725105Swnj */ 2734686Swnj encollide(unit) 2744686Swnj int unit; 2754686Swnj { 2765171Swnj register struct en_softc *es = &en_softc[unit]; 2774686Swnj COUNT(ENCOLLIDE); 2784686Swnj 2795105Swnj es->es_if.if_collisions++; 2805083Swnj if (es->es_oactive == 0) 2814686Swnj return; 2825171Swnj /* 2835171Swnj * Es_mask is a 16 bit number with n low zero bits, with 2845171Swnj * n the number of backoffs. When es_mask is 0 we have 2855171Swnj * backed off 16 times, and give up. 2865171Swnj */ 2875083Swnj if (es->es_mask == 0) { 2885213Swnj printf("en%d: send error\n", unit); 2895083Swnj enxint(unit); 2905171Swnj return; 2914686Swnj } 2925171Swnj /* 2935171Swnj * Another backoff. Restart with delay based on n low bits 2945171Swnj * of the interval timer. 2955171Swnj */ 2965171Swnj es->es_mask <<= 1; 2975171Swnj es->es_delay = mfpr(ICR) &~ es->es_mask; 2985171Swnj enstart(unit); 2994686Swnj } 3004686Swnj 3015631Swnj int enprintierrors; 3026027Ssam struct sockaddr_pup pupsrc = { AF_PUP }; 3036027Ssam struct sockaddr_pup pupdst = { AF_PUP }; 3046027Ssam struct sockproto pupproto = { PF_PUP }; 3055105Swnj /* 3065105Swnj * Ethernet interface receiver interrupt. 3075105Swnj * If input error just drop packet. 3085105Swnj * Otherwise purge input buffered data path and examine 3095105Swnj * packet to determine type. If can't determine length 3105105Swnj * from type, then have to drop packet. Othewise decapsulate 3115105Swnj * packet based on type and pass to type specific higher-level 3125105Swnj * input routine. 3135105Swnj */ 3144686Swnj enrint(unit) 3154686Swnj int unit; 3164686Swnj { 3175171Swnj register struct en_softc *es = &en_softc[unit]; 3185171Swnj struct endevice *addr = (struct endevice *)eninfo[unit]->ui_addr; 3195171Swnj register struct en_header *en; 3205083Swnj struct mbuf *m; 3215171Swnj int len; 3225171Swnj register struct ifqueue *inq; 3235083Swnj int off; 3244686Swnj COUNT(ENRINT); 3254686Swnj 3265171Swnj es->es_if.if_ipackets++; 3275105Swnj 3285105Swnj /* 3295171Swnj * Purge BDP; drop if input error indicated. 3305105Swnj */ 3315105Swnj UBAPURGE(es->es_ifuba.ifu_uba, es->es_ifuba.ifu_r.ifrw_bdp); 3324771Swnj if (addr->en_istat&EN_IERROR) { 3335105Swnj es->es_if.if_ierrors++; 3345631Swnj if (enprintierrors) 3355213Swnj printf("en%d: input error\n", unit); 3365083Swnj goto setup; 3374686Swnj } 3385105Swnj 3395105Swnj /* 3405105Swnj * Get pointer to ethernet header (in input buffer). 3415105Swnj * Deal with trailer protocol: if type is PUP trailer 3425105Swnj * get true type from first 16-bit word past data. 3435105Swnj * Remember that type was trailer by setting off. 3445105Swnj */ 3455105Swnj en = (struct en_header *)(es->es_ifuba.ifu_r.ifrw_addr); 3465083Swnj #define endataaddr(en, off, type) ((type)(((caddr_t)((en)+1)+(off)))) 3475083Swnj if (en->en_type >= ENPUP_TRAIL && 3485083Swnj en->en_type < ENPUP_TRAIL+ENPUP_NTRAILER) { 3495083Swnj off = (en->en_type - ENPUP_TRAIL) * 512; 3505171Swnj if (off >= ENMTU) 3515171Swnj goto setup; /* sanity */ 3525083Swnj en->en_type = *endataaddr(en, off, u_short *); 3535083Swnj } else 3545083Swnj off = 0; 3555105Swnj 3565105Swnj /* 3575105Swnj * Attempt to infer packet length from type; 3585105Swnj * can't deal with packet if can't infer length. 3595105Swnj */ 3605083Swnj switch (en->en_type) { 3615083Swnj 3625083Swnj #ifdef INET 3635083Swnj case ENPUP_IPTYPE: 3645239Sroot len = htons((u_short)endataaddr(en, off ? off+2 : 0, struct ip *)->ip_len); 3655239Sroot if (off) 3665239Sroot len += 2; 3674686Swnj break; 3684686Swnj #endif 3696027Ssam #ifdef PUP 3706027Ssam case ENPUP_PUPTYPE: 3716027Ssam len = endataaddr(en, off, struct pup_header *)->pup_length; 3726027Ssam if (off) 3736027Ssam len -= 2; 3746027Ssam break; 3756027Ssam #endif 3766027Ssam 3775083Swnj default: 3786026Sroot printf("en%d: unknown pkt type 0x%x\n", unit, en->en_type); 3795083Swnj goto setup; 3804686Swnj } 3815083Swnj if (len == 0) 3825083Swnj goto setup; 3835105Swnj 3845105Swnj /* 3855105Swnj * Pull packet off interface. Off is nonzero if packet 3865105Swnj * has trailing header; if_rubaget will then force this header 3875105Swnj * information to be at the front, but we still have to drop 3885171Swnj * the two-byte type which is at the front of any trailer data. 3895105Swnj */ 3905105Swnj m = if_rubaget(&es->es_ifuba, len, off); 3915213Swnj if (m == 0) 3925213Swnj goto setup; 3935105Swnj if (off) { 3945105Swnj m->m_off += 2; 3955105Swnj m->m_len -= 2; 3965105Swnj } 3976027Ssam switch (en->en_type) { 3986027Ssam 3996027Ssam #ifdef INET 4006027Ssam case ENPUP_IPTYPE: 4016027Ssam setipintr(); 4026027Ssam inq = &ipintrq; 4036027Ssam break; 4046027Ssam #endif 4056027Ssam case ENPUP_PUPTYPE: { 4066027Ssam struct pup_header *pup = mtod(m, struct pup_header *); 4076027Ssam 4086027Ssam pupproto.sp_protocol = pup->pup_type; 4096027Ssam pupdst.spup_addr = pup->pup_dport; 4106027Ssam pupsrc.spup_addr = pup->pup_sport; 4116159Ssam raw_input(m, &pupproto, (struct sockaddr *)&pupdst, 4126159Ssam (struct sockaddr *)&pupsrc); 4136027Ssam goto setup; 4146027Ssam } 4156027Ssam } 416*6207Swnj if (IF_QFULL(inq)) { 417*6207Swnj IF_DROP(inq); 418*6207Swnj (void) m_freem(m); 419*6207Swnj } else 420*6207Swnj IF_ENQUEUE(inq, m); 4215105Swnj 4224688Swnj setup: 4235105Swnj /* 4245105Swnj * Reset for next packet. 4255105Swnj */ 4265105Swnj addr->en_iba = es->es_ifuba.ifu_r.ifrw_info; 4275083Swnj addr->en_iwc = -(sizeof (struct en_header) + ENMTU) >> 1; 4284771Swnj addr->en_istat = EN_IEN|EN_GO; 4294688Swnj } 4304686Swnj 4315083Swnj /* 4325083Swnj * Ethernet output routine. 4335083Swnj * Encapsulate a packet of type family for the local net. 4345105Swnj * Use trailer local net encapsulation if enough data in first 4355105Swnj * packet leaves a multiple of 512 bytes of data in remainder. 4365083Swnj */ 4375083Swnj enoutput(ifp, m0, pf) 4385083Swnj struct ifnet *ifp; 4395083Swnj struct mbuf *m0; 4405083Swnj int pf; 4414686Swnj { 4426175Ssam int type, dest, s, off; 4435105Swnj register struct mbuf *m = m0; 4445083Swnj register struct en_header *en; 4454686Swnj 4465927Sroot COUNT(ENOUTPUT); 4475083Swnj switch (pf) { 4485083Swnj 4495083Swnj #ifdef INET 4505083Swnj case PF_INET: { 4515083Swnj register struct ip *ip = mtod(m0, struct ip *); 4525083Swnj 4535294Sroot #ifndef ENKLUDGE 4545105Swnj dest = ip->ip_dst.s_addr >> 24; 4555294Sroot #else 4565294Sroot dest = (ip->ip_dst.s_addr >> 8) & 0xff; 4575294Sroot #endif 4585239Sroot off = ntohs((u_short)ip->ip_len) - m->m_len; 4595356Sroot #ifndef ENKLUDGE 4605171Swnj if (off > 0 && (off & 0x1ff) == 0 && m->m_off >= MMINOFF + 2) { 4615083Swnj type = ENPUP_TRAIL + (off>>9); 4625105Swnj m->m_off -= 2; 4635105Swnj m->m_len += 2; 4645105Swnj *mtod(m, u_short *) = ENPUP_IPTYPE; 4655105Swnj goto gottrailertype; 4665083Swnj } 4675356Sroot #endif 4685105Swnj type = ENPUP_IPTYPE; 4695105Swnj off = 0; 4705105Swnj goto gottype; 4715083Swnj } 4725083Swnj #endif 4736027Ssam #ifdef PUP 4746027Ssam case PF_PUP: { 4756027Ssam register struct pup_header *pup = mtod(m, struct pup_header *); 4765083Swnj 4776027Ssam dest = pup->pup_dhost; 4786027Ssam off = pup->pup_length - m->m_len; 4796027Ssam if (off > 0 && (off & 0x1ff) == 0 && m->m_off >= MMINOFF + 2) { 4806027Ssam type = ENPUP_TRAIL + (off>>9); 4816027Ssam m->m_off -= 2; 4826027Ssam m->m_len += 2; 4836027Ssam *mtod(m, u_short *) = ENPUP_PUPTYPE; 4846027Ssam goto gottrailertype; 4856027Ssam } 4866027Ssam type = ENPUP_PUPTYPE; 4876027Ssam off = 0; 4886027Ssam goto gottype; 4896027Ssam } 4906027Ssam #endif 4916027Ssam 4925083Swnj default: 4935083Swnj printf("en%d: can't encapsulate pf%d\n", ifp->if_unit, pf); 4945083Swnj m_freem(m0); 4955083Swnj return (0); 4964686Swnj } 4975105Swnj 4985171Swnj gottrailertype: 4995105Swnj /* 5005105Swnj * Packet to be sent as trailer: move first packet 5015105Swnj * (control information) to end of chain. 5025105Swnj */ 5035105Swnj while (m->m_next) 5045105Swnj m = m->m_next; 5055105Swnj m->m_next = m0; 5065105Swnj m = m0->m_next; 5075105Swnj m0->m_next = 0; 5085171Swnj m0 = m; 5095105Swnj 5105171Swnj gottype: 5115105Swnj /* 5125105Swnj * Add local net header. If no space in first mbuf, 5135105Swnj * allocate another. 5145105Swnj */ 5155213Swnj if (m->m_off > MMAXOFF || 5165213Swnj MMINOFF + sizeof (struct en_header) > m->m_off) { 5175584Sroot m = m_get(M_DONTWAIT); 5185083Swnj if (m == 0) { 5195083Swnj m_freem(m0); 5205083Swnj return (0); 5215083Swnj } 5225083Swnj m->m_next = m0; 5235083Swnj m->m_off = MMINOFF; 5245083Swnj m->m_len = sizeof (struct en_header); 5255083Swnj } else { 5265083Swnj m->m_off -= sizeof (struct en_header); 5275083Swnj m->m_len += sizeof (struct en_header); 5285083Swnj } 5295083Swnj en = mtod(m, struct en_header *); 5305083Swnj en->en_shost = ifp->if_host[0]; 5315083Swnj en->en_dhost = dest; 5325083Swnj en->en_type = type; 5335105Swnj 5345105Swnj /* 5355105Swnj * Queue message on interface, and start output if interface 5365105Swnj * not yet active. 5375105Swnj */ 5385083Swnj s = splimp(); 539*6207Swnj if (IF_QFULL(&ifp->if_snd)) { 540*6207Swnj IF_DROP(&ifp->if_snd); 541*6207Swnj m_freem(m); 542*6207Swnj splx(s); 543*6207Swnj return (0); 544*6207Swnj } 5455083Swnj IF_ENQUEUE(&ifp->if_snd, m); 5465083Swnj if (en_softc[ifp->if_unit].es_oactive == 0) 5475083Swnj enstart(ifp->if_unit); 5485275Swnj splx(s); 5495105Swnj return (1); 5504686Swnj } 551