if_de.c (148654) | if_de.c (148887) |
---|---|
1/* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */ 2/*- 3 * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 22 unchanged lines hidden (view full) --- 31 * Written by Matt Thomas 32 * BPF support code stolen directly from if_ec.c 33 * 34 * This driver supports the DEC DE435 or any other PCI 35 * board which support 21040, 21041, or 21140 (mostly). 36 */ 37 38#include <sys/cdefs.h> | 1/* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */ 2/*- 3 * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 22 unchanged lines hidden (view full) --- 31 * Written by Matt Thomas 32 * BPF support code stolen directly from if_ec.c 33 * 34 * This driver supports the DEC DE435 or any other PCI 35 * board which support 21040, 21041, or 21140 (mostly). 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/sys/dev/de/if_de.c 148654 2005-08-03 00:18:35Z rwatson $"); | 39__FBSDID("$FreeBSD: head/sys/dev/de/if_de.c 148887 2005-08-09 10:20:02Z rwatson $"); |
40 41#define TULIP_HDR_DATA 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/endian.h> 46#include <sys/mbuf.h> 47#include <sys/socket.h> --- 255 unchanged lines hidden (view full) --- 303tulip_linkup( 304 tulip_softc_t * const sc, 305 tulip_media_t media) 306{ 307 TULIP_LOCK_ASSERT(sc); 308 if ((sc->tulip_flags & TULIP_LINKUP) == 0) 309 sc->tulip_flags |= TULIP_PRINTLINKUP; 310 sc->tulip_flags |= TULIP_LINKUP; | 40 41#define TULIP_HDR_DATA 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/endian.h> 46#include <sys/mbuf.h> 47#include <sys/socket.h> --- 255 unchanged lines hidden (view full) --- 303tulip_linkup( 304 tulip_softc_t * const sc, 305 tulip_media_t media) 306{ 307 TULIP_LOCK_ASSERT(sc); 308 if ((sc->tulip_flags & TULIP_LINKUP) == 0) 309 sc->tulip_flags |= TULIP_PRINTLINKUP; 310 sc->tulip_flags |= TULIP_LINKUP; |
311 sc->tulip_ifp->if_flags &= ~IFF_OACTIVE; | 311 sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
312#if 0 /* XXX how does with work with ifmedia? */ 313 if ((sc->tulip_flags & TULIP_DIDNWAY) == 0) { 314 if (sc->tulip_ifp->if_flags & IFF_FULLDUPLEX) { 315 if (TULIP_CAN_MEDIA_FD(media) 316 && sc->tulip_mediums[TULIP_FD_MEDIA_OF(media)] != NULL) 317 media = TULIP_FD_MEDIA_OF(media); 318 } else { 319 if (TULIP_IS_MEDIA_FD(media) --- 281 unchanged lines hidden (view full) --- 601 return; 602 } 603#if defined(TULIP_DEBUG) 604 sc->tulip_dbg.dbg_link_pollintrs++; 605#endif 606 } 607 608 if (event == TULIP_MEDIAPOLL_START) { | 312#if 0 /* XXX how does with work with ifmedia? */ 313 if ((sc->tulip_flags & TULIP_DIDNWAY) == 0) { 314 if (sc->tulip_ifp->if_flags & IFF_FULLDUPLEX) { 315 if (TULIP_CAN_MEDIA_FD(media) 316 && sc->tulip_mediums[TULIP_FD_MEDIA_OF(media)] != NULL) 317 media = TULIP_FD_MEDIA_OF(media); 318 } else { 319 if (TULIP_IS_MEDIA_FD(media) --- 281 unchanged lines hidden (view full) --- 601 return; 602 } 603#if defined(TULIP_DEBUG) 604 sc->tulip_dbg.dbg_link_pollintrs++; 605#endif 606 } 607 608 if (event == TULIP_MEDIAPOLL_START) { |
609 sc->tulip_ifp->if_flags |= IFF_OACTIVE; | 609 sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
610 if (sc->tulip_probe_state != TULIP_PROBE_INACTIVE) 611 return; 612 sc->tulip_probe_mediamask = 0; 613 sc->tulip_probe_passes = 0; 614#if defined(TULIP_DEBUG) 615 sc->tulip_dbg.dbg_media_probes++; 616#endif 617 /* --- 155 unchanged lines hidden (view full) --- 773 * types are not allowed. 774 */ 775 do { 776 sc->tulip_probe_media -= 1; 777 if (sc->tulip_probe_media == TULIP_MEDIA_UNKNOWN) { 778 if (++sc->tulip_probe_passes == 3) { 779 if_printf(ifp, "autosense failed: cable problem?\n"); 780 if ((sc->tulip_ifp->if_flags & IFF_UP) == 0) { | 610 if (sc->tulip_probe_state != TULIP_PROBE_INACTIVE) 611 return; 612 sc->tulip_probe_mediamask = 0; 613 sc->tulip_probe_passes = 0; 614#if defined(TULIP_DEBUG) 615 sc->tulip_dbg.dbg_media_probes++; 616#endif 617 /* --- 155 unchanged lines hidden (view full) --- 773 * types are not allowed. 774 */ 775 do { 776 sc->tulip_probe_media -= 1; 777 if (sc->tulip_probe_media == TULIP_MEDIA_UNKNOWN) { 778 if (++sc->tulip_probe_passes == 3) { 779 if_printf(ifp, "autosense failed: cable problem?\n"); 780 if ((sc->tulip_ifp->if_flags & IFF_UP) == 0) { |
781 sc->tulip_ifp->if_flags &= ~IFF_RUNNING; | 781 sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; |
782 sc->tulip_probe_state = TULIP_PROBE_INACTIVE; 783 return; 784 } 785 } 786 sc->tulip_flags ^= TULIP_TRYNWAY; /* XXX */ 787 sc->tulip_probe_mediamask = 0; 788 sc->tulip_probe_media = TULIP_MEDIA_MAX - 1; 789 } --- 232 unchanged lines hidden (view full) --- 1022 return; 1023 } 1024 1025 /* 1026 * If we've been been asked to start a poll or link change interrupt 1027 * restart the probe (and reset the tulip to a known state). 1028 */ 1029 if (event == TULIP_MEDIAPOLL_START) { | 782 sc->tulip_probe_state = TULIP_PROBE_INACTIVE; 783 return; 784 } 785 } 786 sc->tulip_flags ^= TULIP_TRYNWAY; /* XXX */ 787 sc->tulip_probe_mediamask = 0; 788 sc->tulip_probe_media = TULIP_MEDIA_MAX - 1; 789 } --- 232 unchanged lines hidden (view full) --- 1022 return; 1023 } 1024 1025 /* 1026 * If we've been been asked to start a poll or link change interrupt 1027 * restart the probe (and reset the tulip to a known state). 1028 */ 1029 if (event == TULIP_MEDIAPOLL_START) { |
1030 sc->tulip_ifp->if_flags |= IFF_OACTIVE; | 1030 sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
1031 sc->tulip_cmdmode &= ~(TULIP_CMD_FULLDUPLEX|TULIP_CMD_RXRUN); 1032#ifdef notyet 1033 if (sc->tulip_revinfo >= 0x20) { 1034 sc->tulip_cmdmode |= TULIP_CMD_FULLDUPLEX; 1035 sc->tulip_flags |= TULIP_DIDNWAY; 1036 } 1037#endif 1038 TULIP_CSR_WRITE(sc, csr_command, sc->tulip_cmdmode); --- 90 unchanged lines hidden (view full) --- 1129 if (sc->tulip_probe_timeout <= 0) { 1130 if (sc->tulip_flags & TULIP_WANTRXACT) { 1131 sc->tulip_flags &= ~TULIP_WANTRXACT; 1132 sc->tulip_probe_timeout = TULIP_21041_PROBE_AUIBNC_TIMEOUT; 1133 } else { 1134 if_printf(sc->tulip_ifp, 1135 "autosense failed: cable problem?\n"); 1136 if ((sc->tulip_ifp->if_flags & IFF_UP) == 0) { | 1031 sc->tulip_cmdmode &= ~(TULIP_CMD_FULLDUPLEX|TULIP_CMD_RXRUN); 1032#ifdef notyet 1033 if (sc->tulip_revinfo >= 0x20) { 1034 sc->tulip_cmdmode |= TULIP_CMD_FULLDUPLEX; 1035 sc->tulip_flags |= TULIP_DIDNWAY; 1036 } 1037#endif 1038 TULIP_CSR_WRITE(sc, csr_command, sc->tulip_cmdmode); --- 90 unchanged lines hidden (view full) --- 1129 if (sc->tulip_probe_timeout <= 0) { 1130 if (sc->tulip_flags & TULIP_WANTRXACT) { 1131 sc->tulip_flags &= ~TULIP_WANTRXACT; 1132 sc->tulip_probe_timeout = TULIP_21041_PROBE_AUIBNC_TIMEOUT; 1133 } else { 1134 if_printf(sc->tulip_ifp, 1135 "autosense failed: cable problem?\n"); 1136 if ((sc->tulip_ifp->if_flags & IFF_UP) == 0) { |
1137 sc->tulip_ifp->if_flags &= ~IFF_RUNNING; | 1137 sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; |
1138 sc->tulip_probe_state = TULIP_PROBE_INACTIVE; 1139 return; 1140 } 1141 } 1142 } 1143 } 1144 1145 /* --- 203 unchanged lines hidden (view full) --- 1349 if (sc->tulip_probe_timeout > 0) { 1350 tulip_timeout(sc); 1351 return; 1352 } 1353 printf("%s(phy%d): error: reset of PHY never completed!\n", 1354 ifp->if_xname, phyaddr); 1355 sc->tulip_flags &= ~TULIP_TXPROBE_ACTIVE; 1356 sc->tulip_probe_state = TULIP_PROBE_FAILED; | 1138 sc->tulip_probe_state = TULIP_PROBE_INACTIVE; 1139 return; 1140 } 1141 } 1142 } 1143 } 1144 1145 /* --- 203 unchanged lines hidden (view full) --- 1349 if (sc->tulip_probe_timeout > 0) { 1350 tulip_timeout(sc); 1351 return; 1352 } 1353 printf("%s(phy%d): error: reset of PHY never completed!\n", 1354 ifp->if_xname, phyaddr); 1355 sc->tulip_flags &= ~TULIP_TXPROBE_ACTIVE; 1356 sc->tulip_probe_state = TULIP_PROBE_FAILED; |
1357 sc->tulip_ifp->if_flags &= ~(IFF_UP|IFF_RUNNING); | 1357 sc->tulip_ifp->if_flags &= ~IFF_UP; 1358 sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; |
1358 return; 1359 } 1360 status = tulip_mii_readreg(sc, phyaddr, PHYREG_STATUS); 1361 if ((status & PHYSTS_CAN_AUTONEG) == 0) { 1362#if defined(TULIP_DEBUG) 1363 loudprintf("%s(phy%d): autonegotiation disabled\n", 1364 ifp->if_xname, phyaddr); 1365#endif --- 1813 unchanged lines hidden (view full) --- 3179 TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET); 3180 DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at 3181 33MHz that comes to two microseconds but wait a 3182 bit longer anyways) */ 3183 3184 if (!inreset) { 3185 sc->tulip_flags |= TULIP_INRESET; 3186 sc->tulip_flags &= ~(TULIP_NEEDRESET|TULIP_RXBUFSLOW); | 1359 return; 1360 } 1361 status = tulip_mii_readreg(sc, phyaddr, PHYREG_STATUS); 1362 if ((status & PHYSTS_CAN_AUTONEG) == 0) { 1363#if defined(TULIP_DEBUG) 1364 loudprintf("%s(phy%d): autonegotiation disabled\n", 1365 ifp->if_xname, phyaddr); 1366#endif --- 1813 unchanged lines hidden (view full) --- 3180 TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET); 3181 DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at 3182 33MHz that comes to two microseconds but wait a 3183 bit longer anyways) */ 3184 3185 if (!inreset) { 3186 sc->tulip_flags |= TULIP_INRESET; 3187 sc->tulip_flags &= ~(TULIP_NEEDRESET|TULIP_RXBUFSLOW); |
3187 sc->tulip_ifp->if_flags &= ~IFF_OACTIVE; | 3188 sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
3188 } 3189 3190#if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NOTX) 3191 TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txdescmap->dm_segs[0].ds_addr); 3192#else 3193 TULIP_CSR_WRITE(sc, csr_txlist, TULIP_KVATOPHYS(sc, &sc->tulip_txinfo.ri_first[0])); 3194#endif 3195#if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NORX) --- 117 unchanged lines hidden (view full) --- 3313 TULIP_UNLOCK(sc); 3314} 3315 3316static void 3317tulip_init( 3318 tulip_softc_t * const sc) 3319{ 3320 if (sc->tulip_ifp->if_flags & IFF_UP) { | 3189 } 3190 3191#if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NOTX) 3192 TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txdescmap->dm_segs[0].ds_addr); 3193#else 3194 TULIP_CSR_WRITE(sc, csr_txlist, TULIP_KVATOPHYS(sc, &sc->tulip_txinfo.ri_first[0])); 3195#endif 3196#if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NORX) --- 117 unchanged lines hidden (view full) --- 3314 TULIP_UNLOCK(sc); 3315} 3316 3317static void 3318tulip_init( 3319 tulip_softc_t * const sc) 3320{ 3321 if (sc->tulip_ifp->if_flags & IFF_UP) { |
3321 if ((sc->tulip_ifp->if_flags & IFF_RUNNING) == 0) { | 3322 if ((sc->tulip_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { |
3322 /* initialize the media */ 3323 tulip_reset(sc); 3324 } | 3323 /* initialize the media */ 3324 tulip_reset(sc); 3325 } |
3325 sc->tulip_ifp->if_flags |= IFF_RUNNING; | 3326 sc->tulip_ifp->if_drv_flags |= IFF_DRV_RUNNING; |
3326 if (sc->tulip_ifp->if_flags & IFF_PROMISC) { 3327 sc->tulip_flags |= TULIP_PROMISC; 3328 sc->tulip_cmdmode |= TULIP_CMD_PROMISCUOUS; 3329 sc->tulip_intrmask |= TULIP_STS_TXINTR; 3330 } else { 3331 sc->tulip_flags &= ~TULIP_PROMISC; 3332 sc->tulip_cmdmode &= ~TULIP_CMD_PROMISCUOUS; 3333 if (sc->tulip_flags & TULIP_ALLMULTI) { 3334 sc->tulip_cmdmode |= TULIP_CMD_ALLMULTI; 3335 } else { 3336 sc->tulip_cmdmode &= ~TULIP_CMD_ALLMULTI; 3337 } 3338 } 3339 sc->tulip_cmdmode |= TULIP_CMD_TXRUN; 3340 if ((sc->tulip_flags & (TULIP_TXPROBE_ACTIVE|TULIP_WANTSETUP)) == 0) { 3341 tulip_rx_intr(sc); 3342 sc->tulip_cmdmode |= TULIP_CMD_RXRUN; 3343 sc->tulip_intrmask |= TULIP_STS_RXSTOPPED; 3344 } else { | 3327 if (sc->tulip_ifp->if_flags & IFF_PROMISC) { 3328 sc->tulip_flags |= TULIP_PROMISC; 3329 sc->tulip_cmdmode |= TULIP_CMD_PROMISCUOUS; 3330 sc->tulip_intrmask |= TULIP_STS_TXINTR; 3331 } else { 3332 sc->tulip_flags &= ~TULIP_PROMISC; 3333 sc->tulip_cmdmode &= ~TULIP_CMD_PROMISCUOUS; 3334 if (sc->tulip_flags & TULIP_ALLMULTI) { 3335 sc->tulip_cmdmode |= TULIP_CMD_ALLMULTI; 3336 } else { 3337 sc->tulip_cmdmode &= ~TULIP_CMD_ALLMULTI; 3338 } 3339 } 3340 sc->tulip_cmdmode |= TULIP_CMD_TXRUN; 3341 if ((sc->tulip_flags & (TULIP_TXPROBE_ACTIVE|TULIP_WANTSETUP)) == 0) { 3342 tulip_rx_intr(sc); 3343 sc->tulip_cmdmode |= TULIP_CMD_RXRUN; 3344 sc->tulip_intrmask |= TULIP_STS_RXSTOPPED; 3345 } else { |
3345 sc->tulip_ifp->if_flags |= IFF_OACTIVE; | 3346 sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
3346 sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN; 3347 sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED; 3348 } 3349 TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); 3350 TULIP_CSR_WRITE(sc, csr_command, sc->tulip_cmdmode); 3351 if ((sc->tulip_flags & (TULIP_WANTSETUP|TULIP_TXPROBE_ACTIVE)) == TULIP_WANTSETUP) 3352 tulip_txput_setup(sc); 3353 } else { | 3347 sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN; 3348 sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED; 3349 } 3350 TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); 3351 TULIP_CSR_WRITE(sc, csr_command, sc->tulip_cmdmode); 3352 if ((sc->tulip_flags & (TULIP_WANTSETUP|TULIP_TXPROBE_ACTIVE)) == TULIP_WANTSETUP) 3353 tulip_txput_setup(sc); 3354 } else { |
3354 sc->tulip_ifp->if_flags &= ~IFF_RUNNING; | 3355 sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; |
3355 tulip_reset(sc); 3356 } 3357} 3358 3359static void 3360tulip_rx_intr( 3361 tulip_softc_t * const sc) 3362{ --- 406 unchanged lines hidden (view full) --- 3769 } 3770 } 3771 } 3772 3773 if (++ri->ri_nextin == ri->ri_last) 3774 ri->ri_nextin = ri->ri_first; 3775 3776 if ((sc->tulip_flags & TULIP_TXPROBE_ACTIVE) == 0) | 3356 tulip_reset(sc); 3357 } 3358} 3359 3360static void 3361tulip_rx_intr( 3362 tulip_softc_t * const sc) 3363{ --- 406 unchanged lines hidden (view full) --- 3770 } 3771 } 3772 } 3773 3774 if (++ri->ri_nextin == ri->ri_last) 3775 ri->ri_nextin = ri->ri_first; 3776 3777 if ((sc->tulip_flags & TULIP_TXPROBE_ACTIVE) == 0) |
3777 sc->tulip_ifp->if_flags &= ~IFF_OACTIVE; | 3778 sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; |
3778 } 3779 /* 3780 * If nothing left to transmit, disable the timer. 3781 * Else if progress, reset the timer back to 2 ticks. 3782 */ 3783 if (ri->ri_free == ri->ri_max || (sc->tulip_flags & TULIP_TXPROBE_ACTIVE)) 3784 sc->tulip_txtimer = 0; 3785 else if (xmits > 0) --- 489 unchanged lines hidden (view full) --- 4275 */ 4276 ri->ri_nextout = nextout; 4277 ri->ri_free = free; 4278 4279 TULIP_PERFEND(txput); 4280 4281 if (sc->tulip_flags & TULIP_TXPROBE_ACTIVE) { 4282 TULIP_CSR_WRITE(sc, csr_txpoll, 1); | 3779 } 3780 /* 3781 * If nothing left to transmit, disable the timer. 3782 * Else if progress, reset the timer back to 2 ticks. 3783 */ 3784 if (ri->ri_free == ri->ri_max || (sc->tulip_flags & TULIP_TXPROBE_ACTIVE)) 3785 sc->tulip_txtimer = 0; 3786 else if (xmits > 0) --- 489 unchanged lines hidden (view full) --- 4276 */ 4277 ri->ri_nextout = nextout; 4278 ri->ri_free = free; 4279 4280 TULIP_PERFEND(txput); 4281 4282 if (sc->tulip_flags & TULIP_TXPROBE_ACTIVE) { 4283 TULIP_CSR_WRITE(sc, csr_txpoll, 1); |
4283 sc->tulip_ifp->if_flags |= IFF_OACTIVE; | 4284 sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
4284 TULIP_PERFEND(txput); 4285 return NULL; 4286 } 4287 4288 /* 4289 * switch back to the single queueing ifstart. 4290 */ 4291 sc->tulip_flags &= ~TULIP_WANTTXSTART; --- 12 unchanged lines hidden (view full) --- 4304 * txstart will move the packet into the transmit ring and clear 4305 * WANTTXSTART thereby causing TXINTR to be cleared. 4306 */ 4307 finish: 4308#if defined(TULIP_DEBUG) 4309 sc->tulip_dbg.dbg_txput_finishes[6]++; 4310#endif 4311 if (sc->tulip_flags & (TULIP_WANTTXSTART|TULIP_DOINGSETUP)) { | 4285 TULIP_PERFEND(txput); 4286 return NULL; 4287 } 4288 4289 /* 4290 * switch back to the single queueing ifstart. 4291 */ 4292 sc->tulip_flags &= ~TULIP_WANTTXSTART; --- 12 unchanged lines hidden (view full) --- 4305 * txstart will move the packet into the transmit ring and clear 4306 * WANTTXSTART thereby causing TXINTR to be cleared. 4307 */ 4308 finish: 4309#if defined(TULIP_DEBUG) 4310 sc->tulip_dbg.dbg_txput_finishes[6]++; 4311#endif 4312 if (sc->tulip_flags & (TULIP_WANTTXSTART|TULIP_DOINGSETUP)) { |
4312 sc->tulip_ifp->if_flags |= IFF_OACTIVE; | 4313 sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; |
4313 if ((sc->tulip_intrmask & TULIP_STS_TXINTR) == 0) { 4314 sc->tulip_intrmask |= TULIP_STS_TXINTR; 4315 TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); 4316 } 4317 } else if ((sc->tulip_flags & TULIP_PROMISC) == 0) { 4318 if (sc->tulip_intrmask & TULIP_STS_TXINTR) { 4319 sc->tulip_intrmask &= ~TULIP_STS_TXINTR; 4320 TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); --- 168 unchanged lines hidden (view full) --- 4489 4490static void 4491tulip_ifstart( 4492 struct ifnet * const ifp) 4493{ 4494 TULIP_PERFSTART(ifstart) 4495 tulip_softc_t * const sc = (tulip_softc_t *)ifp->if_softc; 4496 | 4314 if ((sc->tulip_intrmask & TULIP_STS_TXINTR) == 0) { 4315 sc->tulip_intrmask |= TULIP_STS_TXINTR; 4316 TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); 4317 } 4318 } else if ((sc->tulip_flags & TULIP_PROMISC) == 0) { 4319 if (sc->tulip_intrmask & TULIP_STS_TXINTR) { 4320 sc->tulip_intrmask &= ~TULIP_STS_TXINTR; 4321 TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); --- 168 unchanged lines hidden (view full) --- 4490 4491static void 4492tulip_ifstart( 4493 struct ifnet * const ifp) 4494{ 4495 TULIP_PERFSTART(ifstart) 4496 tulip_softc_t * const sc = (tulip_softc_t *)ifp->if_softc; 4497 |
4497 if (ifp->if_flags & IFF_RUNNING) { | 4498 if (ifp->if_drv_flags & IFF_DRV_RUNNING) { |
4498 TULIP_LOCK(sc); 4499 tulip_start(sc); 4500 TULIP_UNLOCK(sc); 4501 } 4502 4503 TULIP_PERFEND(ifstart); 4504} 4505 --- 616 unchanged lines hidden --- | 4499 TULIP_LOCK(sc); 4500 tulip_start(sc); 4501 TULIP_UNLOCK(sc); 4502 } 4503 4504 TULIP_PERFEND(ifstart); 4505} 4506 --- 616 unchanged lines hidden --- |