Make the driver honor the ATMIO_FLAG_ASYNC that requests

asynchronuous open/close operations.
This commit is contained in:
Hartmut Brandt 2003-08-06 13:16:51 +00:00
parent 4f15e38cba
commit b3eead8a06
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118540
4 changed files with 6 additions and 9 deletions

View File

@ -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) &&

View File

@ -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

View File

@ -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);

View File

@ -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