From owner-svn-src-head@FreeBSD.ORG Sat Jul 2 20:58:34 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 C18F5106564A; Sat, 2 Jul 2011 20:58:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFE8E8FC12; Sat, 2 Jul 2011 20:58:33 +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 p62KwXGg055473; Sat, 2 Jul 2011 20:58:33 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p62KwXxE055471; Sat, 2 Jul 2011 20:58:33 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201107022058.p62KwXxE055471@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 2 Jul 2011 20:58:33 +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: r223728 - head/sys/dev/usb/input 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: Sat, 02 Jul 2011 20:58:34 -0000 Author: hselasky Date: Sat Jul 2 20:58:33 2011 New Revision: 223728 URL: http://svn.freebsd.org/changeset/base/223728 Log: Fix for "nomatch" event for ums and ukbd drivers when uhid is loaded. MFC after: 3 days Modified: head/sys/dev/usb/input/uhid.c Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Sat Jul 2 20:26:37 2011 (r223727) +++ head/sys/dev/usb/input/uhid.c Sat Jul 2 20:58:33 2011 (r223728) @@ -634,6 +634,18 @@ uhid_probe(device_t dev) if (usb_test_quirk(uaa, UQ_HID_IGNORE)) return (ENXIO); + /* + * Don't attach to mouse and keyboard devices, hence then no + * "nomatch" event is generated and then ums and ukbd won't + * attach properly when loaded. + */ + if ((uaa->info.bInterfaceClass == UICLASS_HID) && + (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && + ((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) || + (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))) { + return (ENXIO); + } + return (BUS_PROBE_GENERIC); }