diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
commit | 5d770a09e85126b8b3e9fe302c36350a90210cbe (patch) | |
tree | bb70e59641e2310a3c26ec449af5ab0cb7420d9d /sys/pci | |
parent | 74759aaa78777146f23aa05c856f574efdfb41d9 (diff) | |
download | FreeBSD-src-5d770a09e85126b8b3e9fe302c36350a90210cbe.zip FreeBSD-src-5d770a09e85126b8b3e9fe302c36350a90210cbe.tar.gz |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.
Reviewed by: pjd, bz
MFC after: 7 days
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_dc.c | 25 | ||||
-rw-r--r-- | sys/pci/if_de.c | 31 | ||||
-rw-r--r-- | sys/pci/if_pcn.c | 22 | ||||
-rw-r--r-- | sys/pci/if_rl.c | 12 | ||||
-rw-r--r-- | sys/pci/if_sf.c | 22 | ||||
-rw-r--r-- | sys/pci/if_sis.c | 14 | ||||
-rw-r--r-- | sys/pci/if_sk.c | 30 | ||||
-rw-r--r-- | sys/pci/if_ste.c | 22 | ||||
-rw-r--r-- | sys/pci/if_ti.c | 27 | ||||
-rw-r--r-- | sys/pci/if_tl.c | 16 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 14 | ||||
-rw-r--r-- | sys/pci/if_wb.c | 12 | ||||
-rw-r--r-- | sys/pci/if_xl.c | 24 |
13 files changed, 138 insertions, 133 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index 7fd9568..b1ef62a 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -1330,7 +1330,7 @@ dc_setfilt_xircom(struct dc_softc *sc) DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON); - ifp->if_flags |= IFF_RUNNING; + ifp->if_drv_flags |= IFF_DRV_RUNNING; sframe->dc_status = htole32(DC_TXSTAT_OWN); CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF); @@ -2908,7 +2908,7 @@ dc_txeof(struct dc_softc *sc) if (idx != sc->dc_cdata.dc_tx_cons) { /* Some buffers have been freed. */ sc->dc_cdata.dc_tx_cons = idx; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } ifp->if_timer = (sc->dc_cdata.dc_tx_cnt == 0) ? 0 : 5; } @@ -3057,7 +3057,8 @@ dc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) sc->rxcycles = count; dc_rxeof(sc); dc_txeof(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd) && !(ifp->if_flags & IFF_OACTIVE)) + if (!IFQ_IS_EMPTY(&ifp->if_snd) && + !(ifp->if_drv_flags & IFF_DRV_OACTIVE)) dc_start(ifp); if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */ @@ -3328,7 +3329,7 @@ dc_start(struct ifnet *ifp) return; } - if (ifp->if_flags & IFF_OACTIVE) { + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { DC_UNLOCK(sc); return; } @@ -3346,7 +3347,7 @@ dc_start(struct ifnet *ifp) m = m_defrag(m_head, M_DONTWAIT); if (m == NULL) { IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } else { m_head = m; @@ -3355,7 +3356,7 @@ dc_start(struct ifnet *ifp) if (dc_encap(sc, &m_head)) { IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } idx = sc->dc_cdata.dc_tx_prod; @@ -3368,7 +3369,7 @@ dc_start(struct ifnet *ifp) BPF_MTAP(ifp, m_head); if (sc->dc_flags & DC_TX_ONE) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } } @@ -3550,8 +3551,8 @@ dc_init(void *xsc) mii_mediachg(mii); dc_setcfg(sc, sc->dc_if_media); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; /* Don't start the ticker if this is a homePNA link. */ if (IFM_SUBTYPE(mii->mii_media.ifm_media) == IFM_HPNA_1) @@ -3640,7 +3641,7 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data) int need_setfilt = (ifp->if_flags ^ sc->dc_if_flags) & (IFF_PROMISC | IFF_ALLMULTI); - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (need_setfilt) dc_setfilt(sc); } else { @@ -3648,7 +3649,7 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data) dc_init(sc); } } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) dc_stop(sc); } sc->dc_if_flags = ifp->if_flags; @@ -3726,7 +3727,7 @@ dc_stop(struct dc_softc *sc) callout_stop(&sc->dc_stat_ch); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); #ifdef DEVICE_POLLING ether_poll_deregister(ifp); #endif diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 421d1aa..d786abe 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -308,7 +308,7 @@ tulip_linkup( if ((sc->tulip_flags & TULIP_LINKUP) == 0) sc->tulip_flags |= TULIP_PRINTLINKUP; sc->tulip_flags |= TULIP_LINKUP; - sc->tulip_ifp->if_flags &= ~IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; #if 0 /* XXX how does with work with ifmedia? */ if ((sc->tulip_flags & TULIP_DIDNWAY) == 0) { if (sc->tulip_ifp->if_flags & IFF_FULLDUPLEX) { @@ -606,7 +606,7 @@ tulip_media_poll( } if (event == TULIP_MEDIAPOLL_START) { - sc->tulip_ifp->if_flags |= IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; if (sc->tulip_probe_state != TULIP_PROBE_INACTIVE) return; sc->tulip_probe_mediamask = 0; @@ -778,7 +778,7 @@ tulip_media_poll( if (++sc->tulip_probe_passes == 3) { if_printf(ifp, "autosense failed: cable problem?\n"); if ((sc->tulip_ifp->if_flags & IFF_UP) == 0) { - sc->tulip_ifp->if_flags &= ~IFF_RUNNING; + sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; sc->tulip_probe_state = TULIP_PROBE_INACTIVE; return; } @@ -1027,7 +1027,7 @@ tulip_21041_media_poll( * restart the probe (and reset the tulip to a known state). */ if (event == TULIP_MEDIAPOLL_START) { - sc->tulip_ifp->if_flags |= IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; sc->tulip_cmdmode &= ~(TULIP_CMD_FULLDUPLEX|TULIP_CMD_RXRUN); #ifdef notyet if (sc->tulip_revinfo >= 0x20) { @@ -1134,7 +1134,7 @@ tulip_21041_media_poll( if_printf(sc->tulip_ifp, "autosense failed: cable problem?\n"); if ((sc->tulip_ifp->if_flags & IFF_UP) == 0) { - sc->tulip_ifp->if_flags &= ~IFF_RUNNING; + sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; sc->tulip_probe_state = TULIP_PROBE_INACTIVE; return; } @@ -1354,7 +1354,8 @@ tulip_mii_autonegotiate( ifp->if_xname, phyaddr); sc->tulip_flags &= ~TULIP_TXPROBE_ACTIVE; sc->tulip_probe_state = TULIP_PROBE_FAILED; - sc->tulip_ifp->if_flags &= ~(IFF_UP|IFF_RUNNING); + sc->tulip_ifp->if_flags &= ~IFF_UP; + sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; return; } status = tulip_mii_readreg(sc, phyaddr, PHYREG_STATUS); @@ -3184,7 +3185,7 @@ tulip_reset( if (!inreset) { sc->tulip_flags |= TULIP_INRESET; sc->tulip_flags &= ~(TULIP_NEEDRESET|TULIP_RXBUFSLOW); - sc->tulip_ifp->if_flags &= ~IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } #if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NOTX) @@ -3318,11 +3319,11 @@ tulip_init( tulip_softc_t * const sc) { if (sc->tulip_ifp->if_flags & IFF_UP) { - if ((sc->tulip_ifp->if_flags & IFF_RUNNING) == 0) { + if ((sc->tulip_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { /* initialize the media */ tulip_reset(sc); } - sc->tulip_ifp->if_flags |= IFF_RUNNING; + sc->tulip_ifp->if_drv_flags |= IFF_DRV_RUNNING; if (sc->tulip_ifp->if_flags & IFF_PROMISC) { sc->tulip_flags |= TULIP_PROMISC; sc->tulip_cmdmode |= TULIP_CMD_PROMISCUOUS; @@ -3342,7 +3343,7 @@ tulip_init( sc->tulip_cmdmode |= TULIP_CMD_RXRUN; sc->tulip_intrmask |= TULIP_STS_RXSTOPPED; } else { - sc->tulip_ifp->if_flags |= IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN; sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED; } @@ -3351,7 +3352,7 @@ tulip_init( if ((sc->tulip_flags & (TULIP_WANTSETUP|TULIP_TXPROBE_ACTIVE)) == TULIP_WANTSETUP) tulip_txput_setup(sc); } else { - sc->tulip_ifp->if_flags &= ~IFF_RUNNING; + sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; tulip_reset(sc); } } @@ -3774,7 +3775,7 @@ tulip_tx_intr( ri->ri_nextin = ri->ri_first; if ((sc->tulip_flags & TULIP_TXPROBE_ACTIVE) == 0) - sc->tulip_ifp->if_flags &= ~IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } /* * If nothing left to transmit, disable the timer. @@ -4280,7 +4281,7 @@ tulip_txput( if (sc->tulip_flags & TULIP_TXPROBE_ACTIVE) { TULIP_CSR_WRITE(sc, csr_txpoll, 1); - sc->tulip_ifp->if_flags |= IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; TULIP_PERFEND(txput); return NULL; } @@ -4309,7 +4310,7 @@ tulip_txput( sc->tulip_dbg.dbg_txput_finishes[6]++; #endif if (sc->tulip_flags & (TULIP_WANTTXSTART|TULIP_DOINGSETUP)) { - sc->tulip_ifp->if_flags |= IFF_OACTIVE; + sc->tulip_ifp->if_drv_flags |= IFF_DRV_OACTIVE; if ((sc->tulip_intrmask & TULIP_STS_TXINTR) == 0) { sc->tulip_intrmask |= TULIP_STS_TXINTR; TULIP_CSR_WRITE(sc, csr_intr, sc->tulip_intrmask); @@ -4494,7 +4495,7 @@ tulip_ifstart( TULIP_PERFSTART(ifstart) tulip_softc_t * const sc = (tulip_softc_t *)ifp->if_softc; - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { TULIP_LOCK(sc); tulip_start(sc); TULIP_UNLOCK(sc); diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c index c61f12d..1dea7f4 100644 --- a/sys/pci/if_pcn.c +++ b/sys/pci/if_pcn.c @@ -909,7 +909,7 @@ pcn_txeof(sc) if (idx != sc->pcn_cdata.pcn_tx_cons) { /* Some buffers have been freed. */ sc->pcn_cdata.pcn_tx_cons = idx; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } ifp->if_timer = (sc->pcn_cdata.pcn_tx_cnt == 0) ? 0 : 5; @@ -927,7 +927,7 @@ pcn_tick(xsc) sc = xsc; ifp = sc->pcn_ifp; PCN_LOCK(sc); - if (!(ifp->if_flags & IFF_RUNNING)) { + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { PCN_UNLOCK(sc); return; } @@ -1087,7 +1087,7 @@ pcn_start_locked(ifp) idx = sc->pcn_cdata.pcn_tx_prod; - if (ifp->if_flags & IFF_OACTIVE) + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; while(sc->pcn_cdata.pcn_tx_chain[idx] == NULL) { @@ -1097,7 +1097,7 @@ pcn_start_locked(ifp) if (pcn_encap(sc, m_head, &idx)) { IF_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } @@ -1254,8 +1254,8 @@ pcn_init_locked(sc) mii_mediachg(mii); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; callout_reset(&sc->pcn_stat_callout, hz, pcn_tick, sc); @@ -1326,7 +1326,7 @@ pcn_ioctl(ifp, command, data) case SIOCSIFFLAGS: PCN_LOCK(sc); if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING && + if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && !(sc->pcn_if_flags & IFF_PROMISC)) { PCN_CSR_SETBIT(sc, PCN_CSR_EXTCTL1, @@ -1336,7 +1336,7 @@ pcn_ioctl(ifp, command, data) PCN_EXTCTL1_SPND); pcn_csr_write(sc, PCN_CSR_CSR, PCN_CSR_INTEN|PCN_CSR_START); - } else if (ifp->if_flags & IFF_RUNNING && + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && !(ifp->if_flags & IFF_PROMISC) && sc->pcn_if_flags & IFF_PROMISC) { PCN_CSR_SETBIT(sc, PCN_CSR_EXTCTL1, @@ -1346,10 +1346,10 @@ pcn_ioctl(ifp, command, data) PCN_EXTCTL1_SPND); pcn_csr_write(sc, PCN_CSR_CSR, PCN_CSR_INTEN|PCN_CSR_START); - } else if (!(ifp->if_flags & IFF_RUNNING)) + } else if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) pcn_init_locked(sc); } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) pcn_stop(sc); } sc->pcn_if_flags = ifp->if_flags; @@ -1449,7 +1449,7 @@ pcn_stop(sc) bzero((char *)&sc->pcn_ldata->pcn_tx_list, sizeof(sc->pcn_ldata->pcn_tx_list)); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); return; } diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 8d27fb3..5635035 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1266,7 +1266,7 @@ rl_txeof(struct rl_softc *sc) return; } RL_INC(sc->rl_cdata.last_tx); - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } while (sc->rl_cdata.last_tx != sc->rl_cdata.cur_tx); if (RL_LAST_TXMBUF(sc) == NULL) @@ -1499,7 +1499,7 @@ rl_start_locked(struct ifnet *ifp) * packets from the queue. */ if (RL_CUR_TXMBUF(sc) != NULL) - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; } static void @@ -1607,8 +1607,8 @@ rl_init_locked(struct rl_softc *sc) CSR_WRITE_1(sc, RL_CFG1, RL_CFG1_DRVLOAD|RL_CFG1_FULLDUPLEX); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->rl_stat_ch = timeout(rl_tick, sc, hz); } @@ -1659,7 +1659,7 @@ rl_ioctl(struct ifnet *ifp, u_long command, caddr_t data) if (ifp->if_flags & IFF_UP) { rl_init_locked(sc); } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) rl_stop(sc); } RL_UNLOCK(sc); @@ -1720,7 +1720,7 @@ rl_stop(struct rl_softc *sc) ifp->if_timer = 0; untimeout(rl_tick, sc, sc->rl_stat_ch); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); #ifdef DEVICE_POLLING ether_poll_deregister(ifp); #endif /* DEVICE_POLLING */ diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c index 5485fb7..e166b93 100644 --- a/sys/pci/if_sf.c +++ b/sys/pci/if_sf.c @@ -512,18 +512,18 @@ sf_ioctl(ifp, command, data) switch(command) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING && + if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && !(sc->sf_if_flags & IFF_PROMISC)) { SF_SETBIT(sc, SF_RXFILT, SF_RXFILT_PROMISC); - } else if (ifp->if_flags & IFF_RUNNING && + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && !(ifp->if_flags & IFF_PROMISC) && sc->sf_if_flags & IFF_PROMISC) { SF_CLRBIT(sc, SF_RXFILT, SF_RXFILT_PROMISC); - } else if (!(ifp->if_flags & IFF_RUNNING)) + } else if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) sf_init(sc); } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) sf_stop(sc); } sc->sf_if_flags = ifp->if_flags; @@ -1013,7 +1013,7 @@ sf_txeof(sc) } ifp->if_timer = 0; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; csr_write_4(sc, SF_CQ_CONSIDX, (txcons & ~SF_CQ_CONSIDX_TXQ) | @@ -1286,8 +1286,8 @@ sf_init(xsc) /*mii_mediachg(mii);*/ sf_ifmedia_upd(ifp); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->sf_stat_ch = timeout(sf_stats_update, sc, hz); @@ -1375,7 +1375,7 @@ sf_start(ifp) return; } - if (ifp->if_flags & IFF_OACTIVE) { + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { SF_UNLOCK(sc); return; } @@ -1392,7 +1392,7 @@ sf_start(ifp) while(sc->sf_ldata->sf_tx_dlist[i].sf_mbuf == NULL) { if (sc->sf_tx_cnt >= (SF_TX_DLIST_CNT - 5)) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; cur_tx = NULL; break; } @@ -1403,7 +1403,7 @@ sf_start(ifp) cur_tx = &sc->sf_ldata->sf_tx_dlist[i]; if (sf_encap(sc, cur_tx, m_head)) { IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; cur_tx = NULL; break; } @@ -1482,7 +1482,7 @@ sf_stop(sc) } } - ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); SF_UNLOCK(sc); } diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 48a6132..469ab02 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1551,7 +1551,7 @@ sis_txeof(struct sis_softc *sc) if (idx != sc->sis_tx_cons) { /* we freed up some buffers */ sc->sis_tx_cons = idx; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } ifp->if_timer = (sc->sis_tx_cnt == 0) ? 0 : 5; @@ -1815,7 +1815,7 @@ sis_startl(struct ifnet *ifp) idx = sc->sis_tx_prod; - if (ifp->if_flags & IFF_OACTIVE) + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; while(sc->sis_tx_list[idx].sis_mbuf == NULL) { @@ -1825,7 +1825,7 @@ sis_startl(struct ifnet *ifp) if (sis_encap(sc, &m_head, &idx)) { IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } @@ -2068,8 +2068,8 @@ sis_initl(struct sis_softc *sc) mii_mediachg(mii); #endif - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (!sc->in_tick) callout_reset(&sc->sis_stat_ch, hz, sis_tick, sc); @@ -2127,7 +2127,7 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data) case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { sis_init(sc); - } else if (ifp->if_flags & IFF_RUNNING) { + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { SIS_LOCK(sc); sis_stop(sc); SIS_UNLOCK(sc); @@ -2208,7 +2208,7 @@ sis_stop(struct sis_softc *sc) callout_stop(&sc->sis_stat_ch); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); #ifdef DEVICE_POLLING ether_poll_deregister(ifp); #endif diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c index 0daf42e..65b3a5f 100644 --- a/sys/pci/if_sk.c +++ b/sys/pci/if_sk.c @@ -1244,14 +1244,14 @@ sk_ioctl(ifp, command, data) error = EINVAL; else { ifp->if_mtu = ifr->ifr_mtu; - ifp->if_flags &= ~IFF_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; sk_init(sc_if); } break; case SIOCSIFFLAGS: SK_IF_LOCK(sc_if); if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ sc_if->sk_if_flags) & IFF_PROMISC) { sk_setpromisc(sc_if); @@ -1260,7 +1260,7 @@ sk_ioctl(ifp, command, data) } else sk_init(sc_if); } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) sk_stop(sc_if); } sc_if->sk_if_flags = ifp->if_flags; @@ -1269,7 +1269,7 @@ sk_ioctl(ifp, command, data) break; case SIOCADDMULTI: case SIOCDELMULTI: - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { SK_IF_LOCK(sc_if); sk_setmulti(sc_if); SK_IF_UNLOCK(sc_if); @@ -2052,7 +2052,7 @@ sk_start(ifp) */ if (sk_encap(sc_if, m_head, &idx)) { IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } @@ -2086,7 +2086,7 @@ sk_watchdog(ifp) sc_if = ifp->if_softc; printf("sk%d: watchdog timeout\n", sc_if->sk_unit); - ifp->if_flags &= ~IFF_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; sk_init(sc_if); return; @@ -2221,7 +2221,7 @@ sk_txeof(sc_if) CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); if (sc_if->sk_cdata.sk_tx_cnt < SK_TX_RING_CNT - 2) - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc_if->sk_cdata.sk_tx_cons = idx; } @@ -2297,7 +2297,7 @@ sk_intr_bcom(sc_if) */ status = sk_xmac_miibus_readreg(sc_if, SK_PHYADDR_BCOM, BRGPHY_MII_ISR); - if (!(ifp->if_flags & IFF_RUNNING)) { + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { sk_init_xmac(sc_if); return; } @@ -2429,14 +2429,16 @@ sk_intr(xsc) } /* Then MAC interrupts. */ - if (status & SK_ISR_MAC1 && ifp0->if_flags & IFF_RUNNING) { + if (status & SK_ISR_MAC1 && + ifp0->if_drv_flags & IFF_DRV_RUNNING) { if (sc->sk_type == SK_GENESIS) sk_intr_xmac(sc_if0); else sk_intr_yukon(sc_if0); } - if (status & SK_ISR_MAC2 && ifp1->if_flags & IFF_RUNNING) { + if (status & SK_ISR_MAC2 && + ifp1->if_drv_flags & IFF_DRV_RUNNING) { if (sc->sk_type == SK_GENESIS) sk_intr_xmac(sc_if1); else @@ -2760,7 +2762,7 @@ sk_init(xsc) sc = sc_if->sk_softc; mii = device_get_softc(sc_if->sk_miibus); - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { SK_IF_UNLOCK(sc_if); return; } @@ -2889,8 +2891,8 @@ sk_init(xsc) SK_YU_WRITE_2(sc_if, YUKON_GPCR, reg); } - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; SK_IF_UNLOCK(sc_if); @@ -2975,7 +2977,7 @@ sk_stop(sc_if) } } - ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); SK_IF_UNLOCK(sc_if); return; } diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c index 8e73f65..55a4b0e 100644 --- a/sys/pci/if_ste.c +++ b/sys/pci/if_ste.c @@ -901,7 +901,7 @@ ste_txeof(sc) m_freem(cur_tx->ste_mbuf); cur_tx->ste_mbuf = NULL; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_opackets++; STE_INC(idx, STE_TX_LIST_CNT); @@ -1376,8 +1376,8 @@ ste_init(xsc) ste_ifmedia_upd(ifp); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->ste_stat_ch = timeout(ste_stats_update, sc, hz); STE_UNLOCK(sc); @@ -1396,7 +1396,7 @@ ste_stop(sc) ifp = sc->ste_ifp; untimeout(ste_stats_update, sc, sc->ste_stat_ch); - ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); #ifdef DEVICE_POLLING ether_poll_deregister(ifp); #endif /* DEVICE_POLLING */ @@ -1480,26 +1480,26 @@ ste_ioctl(ifp, command, data) switch(command) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING && + if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && !(sc->ste_if_flags & IFF_PROMISC)) { STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); - } else if (ifp->if_flags & IFF_RUNNING && + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && !(ifp->if_flags & IFF_PROMISC) && sc->ste_if_flags & IFF_PROMISC) { STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); } - if (ifp->if_flags & IFF_RUNNING && + if (ifp->if_drv_flags & IFF_DRV_RUNNING && (ifp->if_flags ^ sc->ste_if_flags) & IFF_ALLMULTI) ste_setmulti(sc); - if (!(ifp->if_flags & IFF_RUNNING)) { + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { sc->ste_tx_thresh = STE_TXSTART_THRESH; ste_init(sc); } } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) ste_stop(sc); } sc->ste_if_flags = ifp->if_flags; @@ -1596,7 +1596,7 @@ ste_start(ifp) return; } - if (ifp->if_flags & IFF_OACTIVE) { + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { STE_UNLOCK(sc); return; } @@ -1610,7 +1610,7 @@ ste_start(ifp) */ if (STE_NEXT(idx, STE_TX_LIST_CNT) == sc->ste_cdata.ste_tx_cons) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index 5ce58c5..bef01ae 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -2594,7 +2594,7 @@ ti_txeof(sc) } if (cur_tx != NULL) - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } static void @@ -2620,7 +2620,7 @@ ti_intr(xsc) /* Ack interrupt and stop others from occuring. */ CSR_WRITE_4(sc, TI_MB_HOSTINTR, 1); - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { /* Check RX return ring producer/consumer */ ti_rxeof(sc); @@ -2633,7 +2633,8 @@ ti_intr(xsc) /* Re-enable interrupts. */ CSR_WRITE_4(sc, TI_MB_HOSTINTR, 0); - if (ifp->if_flags & IFF_RUNNING && ifp->if_snd.ifq_head != NULL) + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + ifp->if_snd.ifq_head != NULL) ti_start(ifp); TI_UNLOCK(sc); @@ -2789,7 +2790,7 @@ ti_start(ifp) if ((TI_TX_RING_CNT - sc->ti_txcnt) < m_head->m_pkthdr.csum_data + 16) { IF_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } } @@ -2801,7 +2802,7 @@ ti_start(ifp) */ if (ti_encap(sc, m_head, &prodidx)) { IF_PREPEND(&ifp->if_snd, m_head); - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } @@ -2909,8 +2910,8 @@ static void ti_init2(sc) /* Enable host interrupts. */ CSR_WRITE_4(sc, TI_MB_HOSTINTR, 0); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; /* * Make sure to set media properly. We have to do this @@ -3110,12 +3111,12 @@ ti_ioctl(ifp, command, data) * waiting for it to start up, which may take a * second or two. */ - if (ifp->if_flags & IFF_RUNNING && + if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && !(sc->ti_if_flags & IFF_PROMISC)) { TI_DO_CMD(TI_CMD_SET_PROMISC_MODE, TI_CMD_CODE_PROMISC_ENB, 0); - } else if (ifp->if_flags & IFF_RUNNING && + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && !(ifp->if_flags & IFF_PROMISC) && sc->ti_if_flags & IFF_PROMISC) { TI_DO_CMD(TI_CMD_SET_PROMISC_MODE, @@ -3123,7 +3124,7 @@ ti_ioctl(ifp, command, data) } else ti_init(sc); } else { - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ti_stop(sc); } } @@ -3132,7 +3133,7 @@ ti_ioctl(ifp, command, data) break; case SIOCADDMULTI: case SIOCDELMULTI: - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ti_setmulti(sc); error = 0; } @@ -3148,7 +3149,7 @@ ti_ioctl(ifp, command, data) ifp->if_capenable &= ~IFCAP_HWCSUM; else ifp->if_capenable |= IFCAP_HWCSUM; - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) ti_init(sc); } error = 0; @@ -3529,7 +3530,7 @@ ti_stop(sc) sc->ti_tx_considx.ti_idx = 0; sc->ti_tx_saved_considx = TI_TXCONS_UNSET; - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); TI_UNLOCK(sc); } diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index f9d9815..42ae128 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1655,7 +1655,7 @@ tl_intvec_txeoc(xsc, type) ifp->if_timer = 0; if (sc->tl_cdata.tl_tx_head == NULL) { - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->tl_cdata.tl_tx_tail = NULL; sc->tl_txeoc = 1; } else { @@ -1969,7 +1969,7 @@ tl_start(ifp) * punt. */ if (sc->tl_cdata.tl_tx_free == NULL) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; TL_UNLOCK(sc); return; } @@ -2124,8 +2124,8 @@ tl_init(xsc) /* Send the RX go command */ CMD_SET(sc, TL_CMD_GO|TL_CMD_NES|TL_CMD_RT); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; /* Start the stats update counter */ sc->tl_stat_ch = timeout(tl_stats_update, sc, hz); @@ -2206,12 +2206,12 @@ tl_ioctl(ifp, command, data) switch(command) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING && + if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && !(sc->tl_if_flags & IFF_PROMISC)) { tl_dio_setbit(sc, TL_NETCMD, TL_CMD_CAF); tl_setmulti(sc); - } else if (ifp->if_flags & IFF_RUNNING && + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && !(ifp->if_flags & IFF_PROMISC) && sc->tl_if_flags & IFF_PROMISC) { tl_dio_clrbit(sc, TL_NETCMD, TL_CMD_CAF); @@ -2219,7 +2219,7 @@ tl_ioctl(ifp, command, data) } else tl_init(sc); } else { - if (ifp->if_flags & IFF_RUNNING) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { tl_stop(sc); } } @@ -2332,7 +2332,7 @@ tl_stop(sc) bzero((char *)&sc->tl_ldata->tl_tx_list, sizeof(sc->tl_ldata->tl_tx_list)); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); TL_UNLOCK(sc); return; diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 654de6f..340aac7 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -1109,7 +1109,7 @@ vr_txeof(struct vr_softc *sc) ifp->if_opackets++; m_freem(cur_tx->vr_mbuf); cur_tx->vr_mbuf = NULL; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; cur_tx = cur_tx->vr_nextdesc; } @@ -1400,7 +1400,7 @@ vr_start_locked(struct ifnet *ifp) struct mbuf *m_head; struct vr_chain *cur_tx; - if (ifp->if_flags & IFF_OACTIVE) + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; cur_tx = sc->vr_cdata.vr_tx_prod; @@ -1436,7 +1436,7 @@ vr_start_locked(struct ifnet *ifp) ifp->if_timer = 5; if (cur_tx->vr_mbuf != NULL) - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; } } @@ -1545,8 +1545,8 @@ vr_init_locked(struct vr_softc *sc) mii_mediachg(mii); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->vr_stat_ch = timeout(vr_tick, sc, hz); } @@ -1596,7 +1596,7 @@ vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data) if (ifp->if_flags & IFF_UP) { vr_init_locked(sc); } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) vr_stop(sc); } VR_UNLOCK(sc); @@ -1661,7 +1661,7 @@ vr_stop(struct vr_softc *sc) ifp->if_timer = 0; untimeout(vr_tick, sc, sc->vr_stat_ch); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); #ifdef DEVICE_POLLING ether_poll_deregister(ifp); #endif /* DEVICE_POLLING */ diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c index 9c44e2e..723c1d3 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -1226,7 +1226,7 @@ wb_txeoc(sc) ifp->if_timer = 0; if (sc->wb_cdata.wb_tx_head == NULL) { - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->wb_cdata.wb_tx_tail = NULL; } else { if (WB_TXOWN(sc->wb_cdata.wb_tx_head) == WB_UNSENT) { @@ -1462,7 +1462,7 @@ wb_start(ifp) * punt. */ if (sc->wb_cdata.wb_tx_free->wb_mbuf != NULL) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; WB_UNLOCK(sc); return; } @@ -1649,8 +1649,8 @@ wb_init(xsc) mii_mediachg(mii); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->wb_stat_ch = timeout(wb_tick, sc, hz); WB_UNLOCK(sc); @@ -1715,7 +1715,7 @@ wb_ioctl(ifp, command, data) if (ifp->if_flags & IFF_UP) { wb_init(sc); } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) wb_stop(sc); } error = 0; @@ -1814,7 +1814,7 @@ wb_stop(sc) bzero((char *)&sc->wb_ldata->wb_tx_list, sizeof(sc->wb_ldata->wb_tx_list)); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); WB_UNLOCK(sc); return; diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 72c8ce0..78d100d 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -2159,7 +2159,7 @@ xl_txeof(struct xl_softc *sc) } if (sc->xl_cdata.xl_tx_head == NULL) { - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->xl_cdata.xl_tx_tail = NULL; } else { if (CSR_READ_4(sc, XL_DMACTL) & XL_DMACTL_DOWN_STALLED || @@ -2209,7 +2209,7 @@ xl_txeof_90xB(struct xl_softc *sc) sc->xl_cdata.xl_tx_cons = idx; if (cur_tx != NULL) - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } /* @@ -2611,7 +2611,7 @@ xl_start_locked(struct ifnet *ifp) xl_txeoc(sc); xl_txeof(sc); if (sc->xl_cdata.xl_tx_free == NULL) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; return; } } @@ -2729,7 +2729,7 @@ xl_start_90xB_locked(struct ifnet *ifp) XL_LOCK_ASSERT(sc); - if (ifp->if_flags & IFF_OACTIVE) + if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; idx = sc->xl_cdata.xl_tx_prod; @@ -2738,7 +2738,7 @@ xl_start_90xB_locked(struct ifnet *ifp) while (sc->xl_cdata.xl_tx_chain[idx].xl_mbuf == NULL) { if ((XL_TX_LIST_CNT - sc->xl_cdata.xl_tx_cnt) < 3) { - ifp->if_flags |= IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } @@ -3029,8 +3029,8 @@ xl_init_locked(struct xl_softc *sc) /* Select window 7 for normal operations. */ XL_SEL_WIN(7); - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->xl_stat_ch = timeout(xl_stats_update, sc, hz); } @@ -3166,14 +3166,14 @@ xl_ioctl(struct ifnet *ifp, u_long command, caddr_t data) XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING && + if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && !(sc->xl_if_flags & IFF_PROMISC)) { rxfilt |= XL_RXFILTER_ALLFRAMES; CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); XL_SEL_WIN(7); - } else if (ifp->if_flags & IFF_RUNNING && + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && !(ifp->if_flags & IFF_PROMISC) && sc->xl_if_flags & IFF_PROMISC) { rxfilt &= ~XL_RXFILTER_ALLFRAMES; @@ -3181,11 +3181,11 @@ xl_ioctl(struct ifnet *ifp, u_long command, caddr_t data) XL_CMD_RX_SET_FILT|rxfilt); XL_SEL_WIN(7); } else { - if ((ifp->if_flags & IFF_RUNNING) == 0) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) xl_init_locked(sc); } } else { - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) xl_stop(sc); } sc->xl_if_flags = ifp->if_flags; @@ -3344,7 +3344,7 @@ xl_stop(struct xl_softc *sc) if (sc->xl_ldata.xl_tx_list != NULL) bzero(sc->xl_ldata.xl_tx_list, XL_TX_LIST_SZ); - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); } /* |