summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-05-26 16:37:54 +0000
committerjkim <jkim@FreeBSD.org>2010-05-26 16:37:54 +0000
commit8dd88ee72437269f6edd3612fb57c46b8adfc020 (patch)
tree084ec782ef00542631d457fb17212204c254b96f /sys/isa
parent4f460f2f9a60e4e057d4da1218e2469e303e94b9 (diff)
downloadFreeBSD-src-8dd88ee72437269f6edd3612fb57c46b8adfc020.zip
FreeBSD-src-8dd88ee72437269f6edd3612fb57c46b8adfc020.tar.gz
Do not attempt to switch to the same VTs between suspend and resume.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/syscons_isa.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c
index 5b6b2d1..e0dcdba 100644
--- a/sys/isa/syscons_isa.c
+++ b/sys/isa/syscons_isa.c
@@ -119,14 +119,15 @@ scsuspend(device_t dev)
if (sc->cur_scp == NULL)
return (0);
- if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch) {
+ if (sc->suspend_in_progress == 0) {
sc_cur_scr = sc->cur_scp->index;
- do {
- sc_switch_scr(sc, 0);
- if (!sc->switch_in_progress)
- break;
- pause("scsuspend", hz);
- } while (retry--);
+ if (!sc_no_suspend_vtswitch && sc_cur_scr != 0)
+ do {
+ sc_switch_scr(sc, 0);
+ if (!sc->switch_in_progress)
+ break;
+ pause("scsuspend", hz);
+ } while (retry--);
}
sc->suspend_in_progress++;
@@ -141,8 +142,9 @@ scresume(device_t dev)
sc = &main_softc;
sc->suspend_in_progress--;
- if (sc->suspend_in_progress == 0 && !sc_no_suspend_vtswitch)
- sc_switch_scr(sc, sc_cur_scr);
+ if (sc->suspend_in_progress == 0)
+ if (!sc_no_suspend_vtswitch && sc_cur_scr != 0)
+ sc_switch_scr(sc, sc_cur_scr);
return (0);
}
OpenPOWER on IntegriCloud