From owner-cvs-src-old@FreeBSD.ORG Thu Apr 29 06:16:21 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12742106566B for ; Thu, 29 Apr 2010 06:16:21 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F41B78FC13 for ; Thu, 29 Apr 2010 06:16:20 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o3T6GKaq053817 for ; Thu, 29 Apr 2010 06:16:20 GMT (envelope-from sobomax@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o3T6GKwo053816 for cvs-src-old@freebsd.org; Thu, 29 Apr 2010 06:16:20 GMT (envelope-from sobomax@repoman.freebsd.org) Message-Id: <201004290616.o3T6GKwo053816@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to sobomax@repoman.freebsd.org using -f From: Maxim Sobolev Date: Thu, 29 Apr 2010 06:16:00 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/atkbdc atkbdc.c atkbdc_ebus.c atkbdc_isa.c atkbdcreg.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2010 06:16:21 -0000 sobomax 2010-04-29 06:16:00 UTC FreeBSD src repository Modified files: sys/dev/atkbdc atkbdc.c atkbdc_ebus.c atkbdc_isa.c atkbdcreg.h Log: SVN rev 207354 on 2010-04-29 06:16:00Z by sobomax On certain chipsets AT keyboard controller isn't present and is emulated by BIOS using SMI interrupt. On those chipsets reading from the status port may be thousand times slower than usually. Sometimes this emilation is not working properly resulting in commands timing out and since we assume that inb() operation takes very little time to complete we need to adjust number of retries to keep waiting time within a designed limits (100ms). Measure time it takes to make read_status() call and adjust number of retries accordingly. To keep it simple, use TSC to measure inb() performance and keep it to amd64-only, since TSC may not available on older CPUs. Also enable detection of the AT controller absence on amd64. Reviewed by: jhb MFC after: 1 month Revision Changes Path 1.26 +62 -14 src/sys/dev/atkbdc/atkbdc.c 1.2 +1 -0 src/sys/dev/atkbdc/atkbdc_ebus.c 1.38 +5 -2 src/sys/dev/atkbdc/atkbdc_isa.c 1.13 +1 -0 src/sys/dev/atkbdc/atkbdcreg.h