From owner-cvs-src@FreeBSD.ORG Mon Feb 27 06:24:27 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B57116A420; Mon, 27 Feb 2006 06:24:27 +0000 (GMT) (envelope-from emax@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19ABB43D45; Mon, 27 Feb 2006 06:24:27 +0000 (GMT) (envelope-from emax@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1R6OQ3o079541; Mon, 27 Feb 2006 06:24:26 GMT (envelope-from emax@repoman.freebsd.org) Received: (from emax@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1R6OQTq079540; Mon, 27 Feb 2006 06:24:26 GMT (envelope-from emax) Message-Id: <200602270624.k1R6OQTq079540@repoman.freebsd.org> From: Maksim Yevmenkin Date: Mon, 27 Feb 2006 06:24:26 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/dev/kbdmux kbdmux.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2006 06:24:27 -0000 emax 2006-02-27 06:24:26 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/dev/kbdmux kbdmux.c Log: MFC recent changes to kbdmux(4) Fix hard lockup caused by kbdmux(4) when kbdmux(4), PS/2 keyboard (atkbd(4)) and PS/2 mouse (psm(4)) are used together. Turns out that atkbd(4) check_char() method may return "true" while read_char() method returns NOKEY. When this happens kbdmux(4) was simply stuck in the dead loop. Avoid dead loop in kbdmux(4) by breaking out of the loop if read_char() method returns NOKEY. It almost seems like a bug in atkkbd(4), atkbd_check_char() calls kbdc_data_ready(), and, the later will return "true" if there are pending data in either kbd or aux queue. However, because both aux and kbd are on the same controller, I'm not sure if this is a bug or feature. While I'm here fix a couple of whitespaces. Tested by: markus Approved by: re (scottl) Revision Changes Path 1.2.2.3 +13 -4 src/sys/dev/kbdmux/kbdmux.c