From owner-freebsd-arch@FreeBSD.ORG Mon Jan 11 08:10:15 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 3E043106566C; Mon, 11 Jan 2010 08:10:15 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 948CA8FC14; Mon, 11 Jan 2010 08:10:14 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=7b-hCywwsQoA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=kZdMSgTYvZJcta6hoWwA:9 a=KWypLC0h7pELgbFwhtCYdqhLRjsA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1161889717; Mon, 11 Jan 2010 09:10:11 +0100 From: Hans Petter Selasky To: freebsd-arch@freebsd.org Date: Mon, 11 Jan 2010 09:08:49 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) References: In-Reply-To: X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001110908.49441.hselasky@c2i.net> Cc: Michael Grant , freebsd-bugs@freebsd.org Subject: Re: 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 08:10:15 -0000 On Monday 11 January 2010 07:40:26 Michael Grant wrote: > 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? > if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE)) return (BUS_PROBE_GENERIC); This has been fixed in newer source code, 8+9 I believe. --HPS