From owner-freebsd-arch@FreeBSD.ORG Mon Jan 11 07:01:12 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06AB0106566C; Mon, 11 Jan 2010 07:01:12 +0000 (UTC) (envelope-from Michael.Grant@students.wits.ac.za) Received: from viruswall.wits.ac.za (viruswall.wits.ac.za [146.141.15.4]) by mx1.freebsd.org (Postfix) with ESMTP id 829208FC08; Mon, 11 Jan 2010 07:01:11 +0000 (UTC) Received: from [146.141.15.4] (helo=imss.wits.ac.za) by viruswall.wits.ac.za with esmtp (Exim 4.42) id 1NUDho-0005oB-Ry; Mon, 11 Jan 2010 08:24:48 +0200 Received: from imss.wits.ac.za (localhost [127.0.0.1]) by localhost.wits.ac.za (Postfix) with ESMTP id 9C6A0211CB; Mon, 11 Jan 2010 08:24:48 +0200 (SAST) Received: from spmta01.inet.wits.ac.za (studentmail.wits.ac.za [146.141.13.132]) by imss.wits.ac.za (Postfix) with ESMTP id 77D36211B1; Mon, 11 Jan 2010 08:24:48 +0200 (SAST) MIME-version: 1.0 Content-transfer-encoding: 7bit Content-disposition: inline Content-type: text/plain; charset="us-ascii" Received: from students.wits.ac.za ([10.10.142.20]) by spmta01.inet.wits.ac.za (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTP id <0KW200JM5KHDHU40@spmta01.inet.wits.ac.za>; Mon, 11 Jan 2010 08:24:49 +0200 (SAST) Received: from [10.10.101.20] by spmailstr01.inet.wits.ac.za (mshttpd); Mon, 11 Jan 2010 08:40:26 +0200 From: Michael Grant To: freebsd-bugs@freebsd.org, freebsd-arch@freebsd.org Message-id: Date: Mon, 11 Jan 2010 08:40:26 +0200 X-Mailer: Sun Java(tm) System Messenger Express 6.3-6.03 (built Mar 14 2008; 32bit) Content-language: en X-Accept-Language: en Priority: normal Cc: Subject: New USB ums driver returns incorrect value on probe X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 07:01:12 -0000 Good day, I am trying to port an excellent driver for a HID peripheral to the new USB stack on 8.0 and noticed some strange behaviour: The device, by default, operates as a mouse and only once a sensible driver communicates to it will the device enter an extended mode. The interesting thing is that this device is never given to the driver to be probed. I notice in the DEVICE_PROBE(9) man page: "If a success code of zero is returned, the driver can assume that it will be the one attached". Now looking in /usr/src/sys/dev/usb/input/ums.c if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE)) return (0); I think the return value should be BUS_PROBE_DEFAULT and not 0, after all the ums driver is generic. I have not submitted a PR, should I do that as well or is a post to this list sufficient? Kind regards, Mike Grant.

This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorized signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary.