summaryrefslogtreecommitdiffstats
path: root/sys/dev/fatm
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-08-06 12:37:50 +0000
committerharti <harti@FreeBSD.org>2003-08-06 12:37:50 +0000
commit6f8d0de823bf097b45c099759c9979f41333c1bc (patch)
treee1e35ea2027548c155dee46e4032505c6544aa89 /sys/dev/fatm
parentdf05426cf508d199ab07a3ca7031ee40bb5e273d (diff)
downloadFreeBSD-src-6f8d0de823bf097b45c099759c9979f41333c1bc.zip
FreeBSD-src-6f8d0de823bf097b45c099759c9979f41333c1bc.tar.gz
Honor the new ATMIO_FLAG_ASYNC for asynchronuous open/close operations
on a VC.
Diffstat (limited to 'sys/dev/fatm')
-rw-r--r--sys/dev/fatm/if_fatm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c
index f2e5c3b..f9a9068 100644
--- a/sys/dev/fatm/if_fatm.c
+++ b/sys/dev/fatm/if_fatm.c
@@ -2261,7 +2261,8 @@ fatm_open_vcc(struct fatm_softc *sc, struct atmio_openvcc *op, int wait)
cmd |= (5 << 8);
q = fatm_start_vcc(sc, op->param.vpi, op->param.vci, cmd, 1,
- wait ? fatm_cmd_complete : fatm_open_complete);
+ (wait && !(op->param.flags & ATMIO_FLAG_ASYNC)) ?
+ fatm_cmd_complete : fatm_open_complete);
if (q == NULL) {
error = EIO;
goto done;
@@ -2271,7 +2272,7 @@ fatm_open_vcc(struct fatm_softc *sc, struct atmio_openvcc *op, int wait)
sc->vccs[op->param.vci] = vc;
sc->open_vccs++;
- if (wait) {
+ if (wait && !(op->param.flags & ATMIO_FLAG_ASYNC)) {
error = fatm_waitvcc(sc, q);
if (error != 0) {
sc->vccs[op->param.vci] = NULL;
@@ -2359,7 +2360,8 @@ fatm_close_vcc(struct fatm_softc *sc, struct atmio_closevcc *cl, int wait)
q = fatm_start_vcc(sc, cl->vpi, cl->vci,
FATM_OP_DEACTIVATE_VCIN | FATM_OP_INTERRUPT_SEL, 1,
- wait ? fatm_cmd_complete : fatm_close_complete);
+ (wait && !(vc->param.flags & ATMIO_FLAG_ASYNC)) ?
+ fatm_cmd_complete : fatm_close_complete);
if (q == NULL) {
error = EIO;
goto done;
@@ -2368,7 +2370,7 @@ fatm_close_vcc(struct fatm_softc *sc, struct atmio_closevcc *cl, int wait)
vc->vflags &= ~(FATM_VCC_OPEN | FATM_VCC_TRY_OPEN);
vc->vflags |= FATM_VCC_TRY_CLOSE;
- if (wait) {
+ if (wait && !(vc->param.flags & ATMIO_FLAG_ASYNC)) {
error = fatm_waitvcc(sc, q);
if (error != 0)
goto done;
OpenPOWER on IntegriCloud