diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2010-05-26 16:37:54 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2010-05-26 16:37:54 +0000 |
commit | 55e1b13327481c139d5edd0449e14f966b1f9b55 (patch) | |
tree | 084ec782ef00542631d457fb17212204c254b96f /sys/isa | |
parent | b2318c286056ee500984f84b15e3b632f171ebae (diff) | |
download | src-55e1b13327481c139d5edd0449e14f966b1f9b55.tar.gz src-55e1b13327481c139d5edd0449e14f966b1f9b55.zip |
Notes
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/syscons_isa.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c index 5b6b2d1ec299..e0dcdbaec05a 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); } |