mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-21 15:45:02 +00:00
Make the driver honor the ATMIO_FLAG_ASYNC that requests
asynchronuous open/close operations.
This commit is contained in:
parent
4f15e38cba
commit
b3eead8a06
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118540
@ -197,6 +197,7 @@ hatm_open_vcc1(struct hatm_softc *sc, struct atm_pseudoioctl *ph)
|
|||||||
|
|
||||||
v->param.flags = ATM_PH_FLAGS(&ph->aph) &
|
v->param.flags = ATM_PH_FLAGS(&ph->aph) &
|
||||||
(ATM_PH_AAL5 | ATM_PH_LLCSNAP);
|
(ATM_PH_AAL5 | ATM_PH_LLCSNAP);
|
||||||
|
v->param.flags |= ATMIO_FLAG_ASYNC;
|
||||||
v->param.vpi = ATM_PH_VPI(&ph->aph);
|
v->param.vpi = ATM_PH_VPI(&ph->aph);
|
||||||
v->param.vci = ATM_PH_VCI(&ph->aph);
|
v->param.vci = ATM_PH_VCI(&ph->aph);
|
||||||
v->param.aal = (ATM_PH_FLAGS(&ph->aph) & ATM_PH_AAL5)
|
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;
|
v->param.tparam.mcr = 0;
|
||||||
|
|
||||||
error = hatm_open_vcc(sc, v);
|
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);
|
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)
|
if (vcc->vflags & HE_VCC_RX_OPEN)
|
||||||
hatm_rx_vcc_close(sc, cid);
|
hatm_rx_vcc_close(sc, cid);
|
||||||
|
|
||||||
if (vcc->vflags & HE_VCC_ASYNC)
|
if (vcc->param.flags & ATMIO_FLAG_ASYNC)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
while ((sc->ifatm.ifnet.if_flags & IFF_RUNNING) &&
|
while ((sc->ifatm.ifnet.if_flags & IFF_RUNNING) &&
|
||||||
|
@ -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 (flags & HE_REGM_RBRQ_CON_CLOSED) {
|
||||||
if (vcc->vflags & HE_VCC_RX_CLOSING) {
|
if (vcc->vflags & HE_VCC_RX_CLOSING) {
|
||||||
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))
|
if (!(vcc->vflags & HE_VCC_OPEN))
|
||||||
hatm_vcc_closed(sc, cid);
|
hatm_vcc_closed(sc, cid);
|
||||||
} else
|
} else
|
||||||
@ -223,7 +223,7 @@ hatm_rx(struct hatm_softc *sc, u_int cid, u_int flags, struct mbuf *m0,
|
|||||||
|
|
||||||
#ifdef ENABLE_BPF
|
#ifdef ENABLE_BPF
|
||||||
if (!(vcc->param.flags & ATMIO_FLAG_NG) &&
|
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))
|
(vcc->param.flags & ATM_PH_LLCSNAP))
|
||||||
BPF_MTAP(&sc->ifatm.ifnet, m);
|
BPF_MTAP(&sc->ifatm.ifnet, m);
|
||||||
#endif
|
#endif
|
||||||
|
@ -400,7 +400,7 @@ hatm_start(struct ifnet *ifp)
|
|||||||
|
|
||||||
#ifdef ENABLE_BPF
|
#ifdef ENABLE_BPF
|
||||||
if (!(arg.vcc->param.flags & ATMIO_FLAG_NG) &&
|
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))
|
(arg.vcc->param.flags & ATM_PH_LLCSNAP))
|
||||||
BPF_MTAP(ifp, m);
|
BPF_MTAP(ifp, m);
|
||||||
#endif
|
#endif
|
||||||
@ -465,7 +465,7 @@ hatm_tx_complete(struct hatm_softc *sc, struct tpd *tpd, uint32_t flags)
|
|||||||
return;
|
return;
|
||||||
if ((flags & HE_REGM_TBRQ_EOS) && (vcc->vflags & HE_VCC_TX_CLOSING)) {
|
if ((flags & HE_REGM_TBRQ_EOS) && (vcc->vflags & HE_VCC_TX_CLOSING)) {
|
||||||
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);
|
hatm_tx_vcc_closed(sc, tpd->cid);
|
||||||
if (!(vcc->vflags & HE_VCC_OPEN)) {
|
if (!(vcc->vflags & HE_VCC_OPEN)) {
|
||||||
hatm_vcc_closed(sc, tpd->cid);
|
hatm_vcc_closed(sc, tpd->cid);
|
||||||
|
@ -338,7 +338,6 @@ struct hevcc {
|
|||||||
#define HE_VCC_TX_OPEN 0x00040000
|
#define HE_VCC_TX_OPEN 0x00040000
|
||||||
#define HE_VCC_TX_CLOSING 0x00080000
|
#define HE_VCC_TX_CLOSING 0x00080000
|
||||||
#define HE_VCC_FLOW_CTRL 0x00100000
|
#define HE_VCC_FLOW_CTRL 0x00100000
|
||||||
#define HE_VCC_ASYNC 0x00200000
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CBR rate groups
|
* CBR rate groups
|
||||||
|
Loading…
Reference in New Issue
Block a user