Commit 2e7f2525 authored by Pavel Machek's avatar Pavel Machek Committed by Vojtech Pavlik

input: Alt-arrow console switch is routinely dropped under high load. This

patch fixes it: alt-arrow has to start from console _we want to switch
to_, if switch is already pending.
parent 19079579
......@@ -493,9 +493,13 @@ static void fn_lastcons(struct vc_data *vc, struct pt_regs *regs)
static void fn_dec_console(struct vc_data *vc, struct pt_regs *regs)
{
int i;
for (i = fg_console-1; i != fg_console; i--) {
int i, cur = fg_console;
/* Currently switching? Queue this next switch relative to that. */
if (want_console != -1)
cur = want_console;
for (i = cur-1; i != cur; i--) {
if (i == -1)
i = MAX_NR_CONSOLES-1;
if (vc_cons_allocated(i))
......@@ -506,9 +510,13 @@ static void fn_dec_console(struct vc_data *vc, struct pt_regs *regs)
static void fn_inc_console(struct vc_data *vc, struct pt_regs *regs)
{
int i;
int i, cur = fg_console;
/* Currently switching? Queue this next switch relative to that. */
if (want_console != -1)
cur = want_console;
for (i = fg_console+1; i != fg_console; i++) {
for (i = cur+1; i != cur; i++) {
if (i == MAX_NR_CONSOLES)
i = 0;
if (vc_cons_allocated(i))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment