From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 6 07:15:24 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA6F106566B for ; Tue, 6 Sep 2011 07:15:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.c2i.net [212.247.154.66]) by mx1.freebsd.org (Postfix) with ESMTP id 23EB68FC12 for ; Tue, 6 Sep 2011 07:15:23 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=yVKV3zusvCapyMfYJBNW2j35FMEuTKq6vh/tt/1L5+g= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=ze3EKyZnpQUA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=xF7t-OYbmS5wLagobAoA:9 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 7981201; Tue, 06 Sep 2011 09:11:58 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Tue, 6 Sep 2011 09:09:18 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109060909.18300.hselasky@c2i.net> Cc: Daniel Grech Subject: Re: Detach USB Device Driver and Attach it to ugen driver at runtime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 07:15:24 -0000 On Tuesday 06 September 2011 03:53:55 Daniel O'Connor wrote: > On 05/09/2011, at 23:10, Daniel Grech wrote: > > Hi, I'm using libusb to gain access to raw USB Data from userspace. My > > problem is that this library only works with devices which are treated as > > generic devices ("handled by the ugen driver"). I need a mechanism that > > will allow me to detach any device specific drivers that are attached to > > a device and attach the ugen driver instead. I want to do this without > > re-compiling the FreeBSD Kernel. Thanks in advance for your help. > > You can access the device via ugen even if a kernel driver has attached to > it. > > I suspect you wouldn't be able to if the kernel driver that did attach is > in use, but I am not sure. You can attach even if a kernel driver is attached, though it is best to only have one driver attached at the same time. --HPS