Do not attempt to switch to the same VTs between suspend and resume.
This commit is contained in:
parent
b2318c2860
commit
55e1b13327
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208567
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user