From owner-freebsd-net@FreeBSD.ORG Sun Oct 28 21:05:44 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E4A5CFA; Sun, 28 Oct 2012 21:05:44 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id D1EB98FC12; Sun, 28 Oct 2012 21:05:42 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 337992001; Sun, 28 Oct 2012 22:00:33 +0100 From: Hans Petter Selasky To: Adrian Chadd Subject: Re: VIMAGE crashes on 9.x with hotplug net80211 devices Date: Sun, 28 Oct 2012 22:02:13 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: In-Reply-To: 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-1" Content-Transfer-Encoding: 7bit Message-Id: <201210282202.13679.hselasky@c2i.net> Cc: freebsd-net@freebsd.org, Marko Zec , freebsd-hackers@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 21:05:44 -0000 Hi, I currently have not tested VIMAGE with USB devices. Detach is the final exit for a USB device. There is also shutdown, but softc still is around. --HPS On Sunday 28 October 2012 19:47:20 Adrian Chadd wrote: > ping? > > Marko - would you be willing to add the if_free() vnet context setup into > -HEAD? > > Hans, what do you think about USB device attach? detach will be > covered by the above (I hope!) but we still need to do a > CURVNET_SET(vnet0); during hotplug attach. > > Thanks, > > > Adrian > > On 23 October 2012 10:37, Adrian Chadd wrote: > > On 23 October 2012 00:16, Marko Zec wrote: > >> As already mentioned earlier, I don't terribly object if you'd place > >> CURVNET_SET(ifp->if_vnet) inside if_free() and a limited number of > >> similar functions, but I don't quite believe this is will enough to > >> solve the device_detach() issue without having to touch any of the > >> drivers... > > > > That's why I'm asking for more/better ideas. > > > > So far my ideas are: > > > > * for hotplug insert - do the same as what you're doing during the > > kldload and boot device enumeration pass - call CURVNET_SET(vnet0) > > * for device unload (hotplug or otherwise) - if vnet isn't set, > > implicitly set it to vnet0 > > * for the net80211 vaps, they get destroyed in a few places (ioctl > > path, device detach path, I'm sure I saw one more) so I have to use > > CURVNET_SET(ifp->if_vnet) on those. > > > > Now, that _should_ fix it for ath(4) and net80211, and it should fix > > it for all the other non-USB wireless devices out there. > > > > Now as for USB - Hans, what do you think? Should we do something > > similar? How does VIMAGE work right now with USB wireless and USB > > ethernet devices? > > > > Marko - thanks for persisting with this. I'd like to try and make this > > work for 10.0. > > > > > > > > Adrian