Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2012 10:37:02 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Marko Zec <zec@fer.hr>, Hans Petter Selasky <hselasky@freebsd.org>
Cc:        freebsd-net@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Re: VIMAGE crashes on 9.x with hotplug net80211 devices
Message-ID:  <CAJ-VmomnCFhwzs%2B6FVkFmHscnGop7NHxK3pzddStjD3QSMb%2B2g@mail.gmail.com>
In-Reply-To: <201210230916.11513.zec@fer.hr>
References:  <CAJ-VmomchJZ7GUKrAjmmyBXDw-6H6O5fAxT_tfAFfhU=HknG1g@mail.gmail.com> <201210222317.00457.zec@fer.hr> <CAJ-Vmomg_pSZ=ZdGNf9FB7Tx_K4DHMsCQsBuFVyojEHr0r1_Ew@mail.gmail.com> <201210230916.11513.zec@fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23 October 2012 00:16, Marko Zec <zec@fer.hr> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomnCFhwzs%2B6FVkFmHscnGop7NHxK3pzddStjD3QSMb%2B2g>