From owner-svn-src-all@FreeBSD.ORG Sat Jul 13 11:41:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C9D83494; Sat, 13 Jul 2013 11:41:05 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB1C1C20; Sat, 13 Jul 2013 11:41:04 +0000 (UTC) Received: from x23.lan (89.164.2.162) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.2.342.3; Sat, 13 Jul 2013 13:39:50 +0200 From: Marko Zec To: Mikolaj Golub Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Date: Sat, 13 Jul 2013 13:39:52 +0200 User-Agent: KMail/1.9.10 References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130713073118.GC2757@gmail.com> In-Reply-To: <20130713073118.GC2757@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <201307131339.52599.zec@fer.hr> X-Originating-IP: [89.164.2.162] Cc: Craig Rodrigues , svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 11:41:05 -0000 On Saturday 13 July 2013 09:31:19 Mikolaj Golub wrote: > On Fri, Jul 12, 2013 at 10:40:08PM -0700, Adrian Chadd wrote: > > Here's what I have running on my stable/9 VIMAGE laptop. > > > > http://people.freebsd.org/~adrian/ath/20130712-vimage-default-attach-de > >tach.diff > > > > How's this look to put into -HEAD? > > Your patch looks similar to Marko's: > > http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20121115/0 >824ca85/attachment.diff > > Marko took your idea of setting vnet0 context in > device_probe_and_attach(), although there is no is_default_vnet check, > and I also think it is not necessary here -- just unconditionally set > vnet0 is ok. > > Also, as I understand, after handling vnet context in > device_probe_and_attach(), there is no need in curvnet setting in > kldload/kldunload, and Marko removed it. > > In net/if.c, similarly to you, Marko sets vnet context in if_detach(), > but also in if_free(), so this would be good to commit too (I suppose > Marko had good reasons to do this). > > I can't comment the netgraph related parts of your patch as I have no > idea what is going on here. Though I think this could be committed > separately if it is needed. I fear both Adrian's and my patch fall short of addressing the issue of generic USB device attach handling in VIMAGE kernels, i.e. the patches discussed in this thread might be OK for preventing panics with ng_ubt, but what about USB ethernet or wifi devices? If I recall correctly the USB stack has a separate thread which handles device attach events, and IMO the curvnet context should be set there to cover a broader set of different devices. I might be able to find an USB ethernet device for testing next week, but ATM I don't have any piece of USB hardware I could experiment with... Marko