From: H. Peter Anvin Date: Fri, 27 Jun 2008 20:23:00 +0000 (-0700) Subject: x86: setup: issue a null command after enabling A20 via KBC X-Git-Tag: v2.6.27-rc1~1106^2~250^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa60d13fb04f6d5ce72e4da508a4048b934ebd24;p=linux-2.6 x86: setup: issue a null command after enabling A20 via KBC Apparently, DOS and possibly other legacy operating systems issued a null command to the keyboard controller after toggling A20, specifically "pulse output pins" with no output pins specified. This was presumably done for synchronization reasons. This has made it into at least the UHCI spec, and it has been found to cause compatibility problems when "legacy USB" is enabled (which it almost always is) to not have this byte sent. It is *NOT* clear if any of these compatibility problems has any effect on Linux. However, for maximum compatibility, issue this null command after togging A20 through the KBC. Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c index 90943f83e8..ef6e142a6b 100644 --- a/arch/x86/boot/a20.c +++ b/arch/x86/boot/a20.c @@ -1,7 +1,7 @@ /* -*- linux-c -*- ------------------------------------------------------- * * * Copyright (C) 1991, 1992 Linus Torvalds - * Copyright 2007 rPath, Inc. - All Rights Reserved + * Copyright 2007-2008 rPath, Inc. - All Rights Reserved * * This file is part of the Linux kernel, and is made available under * the terms of the GNU General Public License version 2. @@ -95,6 +95,9 @@ static void enable_a20_kbc(void) outb(0xdf, 0x60); /* A20 on */ empty_8042(); + + outb(0xff, 0x64); /* Null command, but UHCI wants it */ + empty_8042(); } static void enable_a20_fast(void)