Date: Wed, 26 May 2010 16:37:54 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208567 - head/sys/isa Message-ID: <201005261637.o4QGbstv099489@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed May 26 16:37:54 2010 New Revision: 208567 URL: http://svn.freebsd.org/changeset/base/208567 Log: Do not attempt to switch to the same VTs between suspend and resume. Modified: head/sys/isa/syscons_isa.c Modified: head/sys/isa/syscons_isa.c ============================================================================== --- head/sys/isa/syscons_isa.c Wed May 26 15:39:43 2010 (r208566) +++ head/sys/isa/syscons_isa.c Wed May 26 16:37:54 2010 (r208567) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005261637.o4QGbstv099489>