diff options
author | harti <harti@FreeBSD.org> | 2003-08-06 13:16:51 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-08-06 13:16:51 +0000 |
commit | a74328e4ef7573138465d87cc353a5e7a0aaba8d (patch) | |
tree | 589bfc3d934e24df496c8be7e7d87923ebbf050e | |
parent | 8f1a543ee8b7fd55a3574a31ebe124a3203fdb23 (diff) | |
download | FreeBSD-src-a74328e4ef7573138465d87cc353a5e7a0aaba8d.zip FreeBSD-src-a74328e4ef7573138465d87cc353a5e7a0aaba8d.tar.gz |
Make the driver honor the ATMIO_FLAG_ASYNC that requests
asynchronuous open/close operations.
-rw-r--r-- | sys/dev/hatm/if_hatm_ioctl.c | 6 | ||||
-rw-r--r-- | sys/dev/hatm/if_hatm_rx.c | 4 | ||||
-rw-r--r-- | sys/dev/hatm/if_hatm_tx.c | 4 | ||||
-rw-r--r-- | sys/dev/hatm/if_hatmvar.h | 1 |
4 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/hatm/if_hatm_ioctl.c b/sys/dev/hatm/if_hatm_ioctl.c index 906f017..5a38c43 100644 --- a/sys/dev/hatm/if_hatm_ioctl.c +++ b/sys/dev/hatm/if_hatm_ioctl.c @@ -197,6 +197,7 @@ hatm_open_vcc1(struct hatm_softc *sc, struct atm_pseudoioctl *ph) v->param.flags = ATM_PH_FLAGS(&ph->aph) & (ATM_PH_AAL5 | ATM_PH_LLCSNAP); + v->param.flags |= ATMIO_FLAG_ASYNC; v->param.vpi = ATM_PH_VPI(&ph->aph); v->param.vci = ATM_PH_VCI(&ph->aph); v->param.aal = (ATM_PH_FLAGS(&ph->aph) & ATM_PH_AAL5) @@ -209,9 +210,6 @@ hatm_open_vcc1(struct hatm_softc *sc, struct atm_pseudoioctl *ph) v->param.tparam.mcr = 0; error = hatm_open_vcc(sc, v); - if (error == 0) - sc->vccs[HE_CID(v->param.vpi, v->param.vci)]->vflags |= - HE_VCC_ASYNC; free(v, M_TEMP); @@ -271,7 +269,7 @@ hatm_close_vcc(struct hatm_softc *sc, struct atmio_closevcc *arg) if (vcc->vflags & HE_VCC_RX_OPEN) hatm_rx_vcc_close(sc, cid); - if (vcc->vflags & HE_VCC_ASYNC) + if (vcc->param.flags & ATMIO_FLAG_ASYNC) goto done; while ((sc->ifatm.ifnet.if_flags & IFF_RUNNING) && diff --git a/sys/dev/hatm/if_hatm_rx.c b/sys/dev/hatm/if_hatm_rx.c index 841ab64..7dbda1c 100644 --- a/sys/dev/hatm/if_hatm_rx.c +++ b/sys/dev/hatm/if_hatm_rx.c @@ -96,7 +96,7 @@ hatm_rx(struct hatm_softc *sc, u_int cid, u_int flags, struct mbuf *m0, if (flags & HE_REGM_RBRQ_CON_CLOSED) { if (vcc->vflags & HE_VCC_RX_CLOSING) { vcc->vflags &= ~HE_VCC_RX_CLOSING; - if (vcc->vflags & HE_VCC_ASYNC) { + if (vcc->param.flags & ATMIO_FLAG_ASYNC) { if (!(vcc->vflags & HE_VCC_OPEN)) hatm_vcc_closed(sc, cid); } else @@ -223,7 +223,7 @@ hatm_rx(struct hatm_softc *sc, u_int cid, u_int flags, struct mbuf *m0, #ifdef ENABLE_BPF if (!(vcc->param.flags & ATMIO_FLAG_NG) && - (vcc->param.flags & ATM_PH_AAL5) && + (vcc->param.aal == ATMIO_AAL_5) && (vcc->param.flags & ATM_PH_LLCSNAP)) BPF_MTAP(&sc->ifatm.ifnet, m); #endif diff --git a/sys/dev/hatm/if_hatm_tx.c b/sys/dev/hatm/if_hatm_tx.c index 284cb9c..38903bd 100644 --- a/sys/dev/hatm/if_hatm_tx.c +++ b/sys/dev/hatm/if_hatm_tx.c @@ -400,7 +400,7 @@ hatm_start(struct ifnet *ifp) #ifdef ENABLE_BPF if (!(arg.vcc->param.flags & ATMIO_FLAG_NG) && - (arg.vcc->param.flags & ATM_PH_AAL5) && + (arg.vcc->param.aal == ATMIO_AAL_5) && (arg.vcc->param.flags & ATM_PH_LLCSNAP)) BPF_MTAP(ifp, m); #endif @@ -465,7 +465,7 @@ hatm_tx_complete(struct hatm_softc *sc, struct tpd *tpd, uint32_t flags) return; if ((flags & HE_REGM_TBRQ_EOS) && (vcc->vflags & HE_VCC_TX_CLOSING)) { vcc->vflags &= ~HE_VCC_TX_CLOSING; - if (vcc->vflags & HE_VCC_ASYNC) { + if (vcc->param.flags & ATMIO_FLAG_ASYNC) { hatm_tx_vcc_closed(sc, tpd->cid); if (!(vcc->vflags & HE_VCC_OPEN)) { hatm_vcc_closed(sc, tpd->cid); diff --git a/sys/dev/hatm/if_hatmvar.h b/sys/dev/hatm/if_hatmvar.h index 4aff3b5..e5f4359 100644 --- a/sys/dev/hatm/if_hatmvar.h +++ b/sys/dev/hatm/if_hatmvar.h @@ -338,7 +338,6 @@ struct hevcc { #define HE_VCC_TX_OPEN 0x00040000 #define HE_VCC_TX_CLOSING 0x00080000 #define HE_VCC_FLOW_CTRL 0x00100000 -#define HE_VCC_ASYNC 0x00200000 /* * CBR rate groups |