summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/syscons_isa.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c
index d4b8fa3..5b6b2d1 100644
--- a/sys/isa/syscons_isa.c
+++ b/sys/isa/syscons_isa.c
@@ -116,10 +116,10 @@ scsuspend(device_t dev)
sc = &main_softc;
- if (sc->cur_scp == NULL || sc->suspend_in_progress)
+ if (sc->cur_scp == NULL)
return (0);
- if (!sc_no_suspend_vtswitch) {
+ if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch) {
sc_cur_scr = sc->cur_scp->index;
do {
sc_switch_scr(sc, 0);
@@ -128,8 +128,7 @@ scsuspend(device_t dev)
pause("scsuspend", hz);
} while (retry--);
}
-
- sc->suspend_in_progress = TRUE;
+ sc->suspend_in_progress++;
return (0);
}
@@ -141,12 +140,8 @@ scresume(device_t dev)
sc = &main_softc;
- if (!sc->suspend_in_progress)
- return (0);
-
- sc->suspend_in_progress = FALSE;
-
- if (!sc_no_suspend_vtswitch)
+ sc->suspend_in_progress--;
+ if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch)
sc_switch_scr(sc, sc_cur_scr);
return (0);
OpenPOWER on IntegriCloud