From owner-freebsd-usb@FreeBSD.ORG Wed Dec 26 17:18:19 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B268543D for ; Wed, 26 Dec 2012 17:18:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3D9AF8FC0C for ; Wed, 26 Dec 2012 17:18:18 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 365303765; Wed, 26 Dec 2012 18:18:11 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Subject: Re: How do I prevent host usb wifi driver from attaching? Date: Wed, 26 Dec 2012 18:19:47 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <50DB2D80.3020304@yandex.ru> In-Reply-To: <50DB2D80.3020304@yandex.ru> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201212261819.47580.hselasky@c2i.net> Cc: "G. Paul Ziemba" , paul+usenet@w6yx.stanford.edu X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2012 17:18:19 -0000 On Wednesday 26 December 2012 18:01:52 Andrey V. Elsukov wrote: > On 26.12.2012 01:22, G. Paul Ziemba wrote: > > I'm running FreeBSD 8.2-STABLE (host) and VirtualBox 4.2.0. > > > > I have followed the steps in http://wiki.freebsd.org/VirtualBox > > to make USB devices available to VirtualBox guests, and that works > > (e.g., a Win2K guest can use a USB scanner I have attached to the > > host's USB interface). > > > > I'm planning another guest running FreeBSD (probably 9.X) and I'd > > like to have a USB wifi dongle (probably a run(4) device) that is > > visible to the guest as a network interface, but that is not visible > > to the host. > > > > I think this can be accomplished by preventing the run(4) driver on the > > host from seizing the usb device, and then configuring VirtualBox to > > let that USB device be visible to the guest. > > > > I think I can prevent the host's usb driver from loading by > > editing (or overriding?) the matching entry in /etc/devd/usb.conf > > which would prevent the run(4) module from loading, but that's > > kind of a big hammer. > > > > Has anyone else solved a similar problem? Is there a finer-grained > > approach? > > +freebsd-usb@, +hselasky@ > > Hi, > > I also find it uncomfortable. In general, automatic kldload of needed > kernel module when new device plugged in is useful feature for desktop. > But it will be more useful if we could disable it without hacking > configs in the /etc/devd/ every time when we updating the system. Hi, There is currently no simple way to prevent a driver from loading, except this: rm /boot/kernel/if_run.ko and make sure you don't have "device if_run" in the kernel config file. It might also work to set the UQ_CFG_INDEX_1 quirk on the device. --HPS