From owner-freebsd-current@FreeBSD.ORG Fri May 29 08:09:03 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0B101065674; Fri, 29 May 2009 08:09:03 +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 0DA4A8FC0A; Fri, 29 May 2009 08:09:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=j+k/Ze5hWUCaCztCgEjzDQ==:17 a=pEtFIjPD-cY2M1aW14MA:9 a=dJ8msjgVuaSQBtC68CqJc7QFQ1oA:4 Received: from [81.191.55.181] (account mc467741@c2i.net HELO laptop) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1079941350; Fri, 29 May 2009 10:09:00 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Fri, 29 May 2009 10:13:02 +0200 User-Agent: KMail/1.9.7 References: <20090528222630.GF74376@citylink.fud.org.nz> In-Reply-To: <20090528222630.GF74376@citylink.fud.org.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905291013.03870.hselasky@c2i.net> Cc: Andrew Thompson Subject: Re: ugen and newbus X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 08:09:04 -0000 On Friday 29 May 2009, Andrew Thompson wrote: > Hi, > > > On the new usb stack the ugen driver attaches to all usb devices and > generates a devd attach event but doesnt actually have a device entry. > > It either needs to be a device or use a different devd notification. It > would be easier if it was a device as that takes care of the housekeeping. > > I am not sure that the best way to attach it into the device tree, a > ugen device represents a physical unit and may have multiple usb drivers > attach (like a 3g device with a built in sd reader). > > ehci0 > usbus0 > uhub0 > umass0 > umass1 > uhub1 > u3g0 > umass2 > uplcom0 > uplcom1 > > This would become > > ehci0 > usbus0 > ugen0 > uhub0 > ugen1 > umass0 > ugen2 > umass1 > ugen3 > uhub1 > ugen4 > u3g0 > umass2 > ugen5 > uplcom0 > ugen6 > uplcom1 > > Is that the right way to do it? > Hi, In other words, you want to wrap "struct usb_device" into "device_t". Attaching ugenX.Y would then be a replacement for enumerating a device. Or do you just want to create a dummy device? --HPS