aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hatm
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2005-08-09 10:20:02 +0000
committerRobert Watson <rwatson@FreeBSD.org>2005-08-09 10:20:02 +0000
commit13f4c340aeeeb104844712bb36899d1adef50579 (patch)
treebb70e59641e2310a3c26ec449af5ab0cb7420d9d /sys/dev/hatm
parent292ee7be1c404a624dda68ddff1bd988a1851e5a (diff)
Notes
Diffstat (limited to 'sys/dev/hatm')
-rw-r--r--sys/dev/hatm/if_hatm.c10
-rw-r--r--sys/dev/hatm/if_hatm_intr.c2
-rw-r--r--sys/dev/hatm/if_hatm_ioctl.c14
-rw-r--r--sys/dev/hatm/if_hatm_rx.c4
-rw-r--r--sys/dev/hatm/if_hatm_tx.c2
5 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c
index 16740f0f2310..cd955acc147d 100644
--- a/sys/dev/hatm/if_hatm.c
+++ b/sys/dev/hatm/if_hatm.c
@@ -1974,7 +1974,7 @@ hatm_initialize(struct hatm_softc *sc)
u_int cid;
static const u_int layout[2][7] = HE_CONFIG_MEM_LAYOUT;
- if (sc->ifp->if_flags & IFF_RUNNING)
+ if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING)
return;
hatm_init_bus_width(sc);
@@ -2244,7 +2244,7 @@ hatm_initialize(struct hatm_softc *sc)
v |= HE_PCIM_CTL0_INIT_ENB | HE_PCIM_CTL0_INT_PROC_ENB;
pci_write_config(sc->dev, HE_PCIR_GEN_CNTL_0, v, 4);
- sc->ifp->if_flags |= IFF_RUNNING;
+ sc->ifp->if_drv_flags |= IFF_DRV_RUNNING;
sc->ifp->if_baudrate = 53 * 8 * IFP2IFATM(sc->ifp)->mib.pcr;
sc->utopia.flags &= ~UTP_FL_POLL_CARRIER;
@@ -2272,9 +2272,9 @@ hatm_stop(struct hatm_softc *sc)
mtx_assert(&sc->mtx, MA_OWNED);
- if (!(sc->ifp->if_flags & IFF_RUNNING))
+ if (!(sc->ifp->if_drv_flags & IFF_DRV_RUNNING))
return;
- sc->ifp->if_flags &= ~IFF_RUNNING;
+ sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
ATMEV_SEND_IFSTATE_CHANGED(IFP2IFATM(sc->ifp),
sc->utopia.carrier == UTP_CARR_OK);
@@ -2318,7 +2318,7 @@ hatm_stop(struct hatm_softc *sc)
/*
* Give any waiters on closing a VCC a chance. They will stop
- * to wait if they see that IFF_RUNNING disappeared.
+ * to wait if they see that IFF_DRV_RUNNING disappeared.
*/
cv_broadcast(&sc->vcc_cv);
cv_broadcast(&sc->cv_rcclose);
diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c
index 3da034f1d58a..750364a8971c 100644
--- a/sys/dev/hatm/if_hatm_intr.c
+++ b/sys/dev/hatm/if_hatm_intr.c
@@ -537,7 +537,7 @@ hatm_intr(void *p)
/* if we have a stray interrupt with a non-initialized card,
* we cannot even lock before looking at the flag */
- if (!(sc->ifp->if_flags & IFF_RUNNING))
+ if (!(sc->ifp->if_drv_flags & IFF_DRV_RUNNING))
return;
mtx_lock(&sc->mtx);
diff --git a/sys/dev/hatm/if_hatm_ioctl.c b/sys/dev/hatm/if_hatm_ioctl.c
index 0a4724af1727..5e37b5dc75ea 100644
--- a/sys/dev/hatm/if_hatm_ioctl.c
+++ b/sys/dev/hatm/if_hatm_ioctl.c
@@ -116,7 +116,7 @@ hatm_open_vcc(struct hatm_softc *sc, struct atmio_openvcc *arg)
return (ENOMEM);
mtx_lock(&sc->mtx);
- if (!(sc->ifp->if_flags & IFF_RUNNING)) {
+ if (!(sc->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
error = EIO;
goto done;
}
@@ -230,7 +230,7 @@ hatm_close_vcc(struct hatm_softc *sc, struct atmio_closevcc *arg)
mtx_lock(&sc->mtx);
vcc = sc->vccs[cid];
- if (!(sc->ifp->if_flags & IFF_RUNNING)) {
+ if (!(sc->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
error = EIO;
goto done;
}
@@ -248,11 +248,11 @@ hatm_close_vcc(struct hatm_softc *sc, struct atmio_closevcc *arg)
if (vcc->param.flags & ATMIO_FLAG_ASYNC)
goto done;
- while ((sc->ifp->if_flags & IFF_RUNNING) &&
+ while ((sc->ifp->if_drv_flags & IFF_DRV_RUNNING) &&
(vcc->vflags & (HE_VCC_TX_CLOSING | HE_VCC_RX_CLOSING)))
cv_wait(&sc->vcc_cv, &sc->mtx);
- if (!(sc->ifp->if_flags & IFF_RUNNING)) {
+ if (!(sc->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
error = EIO;
goto done;
}
@@ -284,7 +284,7 @@ hatm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFADDR:
mtx_lock(&sc->mtx);
ifp->if_flags |= IFF_UP;
- if (!(ifp->if_flags & IFF_RUNNING))
+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
hatm_initialize(sc);
switch (ifa->ifa_addr->sa_family) {
@@ -303,11 +303,11 @@ hatm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFFLAGS:
mtx_lock(&sc->mtx);
if (ifp->if_flags & IFF_UP) {
- if (!(ifp->if_flags & IFF_RUNNING)) {
+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
hatm_initialize(sc);
}
} else {
- if (ifp->if_flags & IFF_RUNNING) {
+ if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
hatm_stop(sc);
}
}
diff --git a/sys/dev/hatm/if_hatm_rx.c b/sys/dev/hatm/if_hatm_rx.c
index bf6c7f7d9c52..b79b2fcd7c02 100644
--- a/sys/dev/hatm/if_hatm_rx.c
+++ b/sys/dev/hatm/if_hatm_rx.c
@@ -316,11 +316,11 @@ hatm_rx_vcc_close(struct hatm_softc *sc, u_int cid)
WRITE_RSR(sc, cid, 0, 0xf, 0);
v = READ4(sc, HE_REGO_RCCSTAT);
- while ((sc->ifp->if_flags & IFF_RUNNING) &&
+ while ((sc->ifp->if_drv_flags & IFF_DRV_RUNNING) &&
(READ4(sc, HE_REGO_RCCSTAT) & HE_REGM_RCCSTAT_PROG))
cv_timedwait(&sc->cv_rcclose, &sc->mtx, 1);
- if (!(sc->ifp->if_flags & IFF_RUNNING))
+ if (!(sc->ifp->if_drv_flags & IFF_DRV_RUNNING))
return;
WRITE_MBOX4(sc, HE_REGO_RCON_CLOSE, cid);
diff --git a/sys/dev/hatm/if_hatm_tx.c b/sys/dev/hatm/if_hatm_tx.c
index 7e2676aae2ef..868b5a3d43d6 100644
--- a/sys/dev/hatm/if_hatm_tx.c
+++ b/sys/dev/hatm/if_hatm_tx.c
@@ -360,7 +360,7 @@ hatm_start(struct ifnet *ifp)
u_int len;
int error;
- if (!(ifp->if_flags & IFF_RUNNING))
+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
return;
mtx_lock(&sc->mtx);
arg.sc = sc;