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/i386/isa | |
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/i386/isa')
-rw-r--r-- | sys/i386/isa/if_el.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c index 6ba3c0c..ad174bd 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -386,8 +386,8 @@ el_init(xsc) CSR_WRITE_1(sc,EL_AC,(EL_AC_IRQE|EL_AC_RX)); /* Set flags appropriately */ - ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; /* And start output. */ el_start(ifp); @@ -413,9 +413,9 @@ el_start(struct ifnet *ifp) EL_LOCK(sc); /* Don't do anything if output is active */ - if(sc->el_ifp->if_flags & IFF_OACTIVE) + if(sc->el_ifp->if_drv_flags & IFF_DRV_OACTIVE) return; - sc->el_ifp->if_flags |= IFF_OACTIVE; + sc->el_ifp->if_drv_flags |= IFF_DRV_OACTIVE; /* The main loop. They warned me against endless loops, but * would I listen? NOOO.... @@ -426,7 +426,7 @@ el_start(struct ifnet *ifp) /* If there's nothing to send, return. */ if(m0 == NULL) { - sc->el_ifp->if_flags &= ~IFF_OACTIVE; + sc->el_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; EL_UNLOCK(sc); return; } @@ -744,15 +744,15 @@ el_ioctl(ifp, command, data) * If interface is marked down and it is running, then stop it */ if (((ifp->if_flags & IFF_UP) == 0) && - (ifp->if_flags & IFF_RUNNING)) { + (ifp->if_drv_flags & IFF_DRV_RUNNING)) { el_stop(ifp->if_softc); - ifp->if_flags &= ~IFF_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; } else { /* * If interface is marked up and it is stopped, then start it */ if ((ifp->if_flags & IFF_UP) && - ((ifp->if_flags & IFF_RUNNING) == 0)) + ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)) el_init(ifp->if_softc); } break; |