From owner-freebsd-usb@FreeBSD.ORG Wed Apr 8 15:43:40 2009 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 379CC1065678 for ; Wed, 8 Apr 2009 15:43:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E40C18FC21 for ; Wed, 8 Apr 2009 15:43:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n38FgaBt072084 for ; Wed, 8 Apr 2009 09:42:36 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 08 Apr 2009 09:43:23 -0600 (MDT) Message-Id: <20090408.094323.420518942.imp@bsdimp.com> To: usb@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: usb2 broken wrt devd X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2009 15:43:46 -0000 When you plug in a device that has no driver, the following traffic is generated to devd: +ugen0.2 vendor=0x0bda product=0x8150 devclass=0x00 devsubclass=0x00 sernum="" at port=1 on ugen0.1 ? at port=1 interface=0 vendor=0x0bda product=0x8150 devclass=0x00 devsubclass=0x00 sernum="" intclass=0xff intsubclass=0x00 on uhub0 -ugen0.2 vendor=0x0bda product=0x8150 devclass=0x00 devsubclass=0x00 sernum="" at port=1 on ugen0.1 There's many things wrong with this: (1) First, ugen0.2 is not a valid device tree node name. Or rather, it suggests a device whose class name is "ugen0." instance 2. "0.2" is not a valid device number. (2) Second, it is contradictory. It says that ugen0.2 attached, but it also says that device didn't attach. That's confusing. (3) Third, devinfo -v | grep ugen produces no output. If devd is told that the device node is in the device tree, then it needs to be able to look it up in the tree. It doesn't today, but many races in the 'ticker' model can be solved by querying for the actual device. (4) There's no ugen0.1 in the tree either, and suffers from #1 and #3. This output comes from: