From owner-svn-src-head@FreeBSD.ORG Fri May 20 22:36:17 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98CB51065670; Fri, 20 May 2011 22:36:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FB408FC12; Fri, 20 May 2011 22:36:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4KMaHoA003665; Fri, 20 May 2011 22:36:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4KMaH28003661; Fri, 20 May 2011 22:36:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105202236.p4KMaH28003661@svn.freebsd.org> From: Xin LI Date: Fri, 20 May 2011 22:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222152 - in head: share/man/man4 sys/dev/atkbdc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2011 22:36:17 -0000 Author: delphij Date: Fri May 20 22:36:17 2011 New Revision: 222152 URL: http://svn.freebsd.org/changeset/base/222152 Log: Add a new knob to atkbd(4) to enable typematic rate detection on boot, which is now disabled by default. The detection is known to cause hangs on boot with some new Lenovo laptops on FreeBSD/amd64. Reported by: gnn Discussed with: jkim MFC after: 3 months Modified: head/share/man/man4/atkbd.4 head/sys/dev/atkbdc/atkbd.c head/sys/dev/atkbdc/atkbdreg.h Modified: head/share/man/man4/atkbd.4 ============================================================================== --- head/share/man/man4/atkbd.4 Fri May 20 22:24:26 2011 (r222151) +++ head/share/man/man4/atkbd.4 Fri May 20 22:36:17 2011 (r222152) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 29, 2008 +.Dd May 20, 2011 .Dt ATKBD 4 .Os .Sh NAME @@ -176,6 +176,11 @@ When this option is given, the .Nm driver will not test the keyboard port during the probe routine. Some machines hang during boot when this test is performed. +.It bit 4 (PROBE_TYPEMATIC) +When this option is given, the +.Nm +driver will try to probe the keyboard typematic rate on boot. +Some machines hang during boot when this test is performed. .El .\".Sh FILES .Sh EXAMPLES Modified: head/sys/dev/atkbdc/atkbd.c ============================================================================== --- head/sys/dev/atkbdc/atkbd.c Fri May 20 22:24:26 2011 (r222151) +++ head/sys/dev/atkbdc/atkbd.c Fri May 20 22:36:17 2011 (r222152) @@ -1097,6 +1097,9 @@ get_typematic(keyboard_t *kbd) x86regs_t regs; uint8_t *p; + if (!(kbd->kb_config & KB_CONF_PROBE_TYPEMATIC)) + return (ENODEV); + if (x86bios_get_intr(0x15) == 0 || x86bios_get_intr(0x16) == 0) return (ENODEV); Modified: head/sys/dev/atkbdc/atkbdreg.h ============================================================================== --- head/sys/dev/atkbdc/atkbdreg.h Fri May 20 22:24:26 2011 (r222151) +++ head/sys/dev/atkbdc/atkbdreg.h Fri May 20 22:36:17 2011 (r222152) @@ -36,6 +36,7 @@ #define KB_CONF_NO_RESET (1 << 1) /* don't reset the keyboard */ #define KB_CONF_ALT_SCANCODESET (1 << 2) /* assume the XT type keyboard */ #define KB_CONF_NO_PROBE_TEST (1 << 3) /* don't test keyboard during probe */ +#define KB_CONF_PROBE_TYPEMATIC (1 << 4) /* probe keyboard typematic */ #ifdef _KERNEL