VIMAGE crashes on 9.x with hotplug net80211 devices

Adrian Chadd adrian at freebsd.org
Thu Nov 15 19:16:12 UTC 2012


Hans brings up a very good point for USB - they split if_alloc and
if_attach across two different threads.

So this works for non-USB devices, but not for USB devices.

Hans, does each device implement its own workqueue for this kind of
delayed action, or is there some generic work queue that is doing this
work?



Adrian

On 15 November 2012 09:36, Marko Zec <zec at fer.hr> wrote:
> On Thursday 15 November 2012 07:18:31 Adrian Chadd wrote:
>> Hi,
>>
>> Here's what I have thus far. Please ignore the device_printf() change.
>>
>> This works for me, both for hotplug cardbus wireless devices as well
>> as (inadvertently!) a USB bluetooth device.
>>
>> What do you think?
>
> It looks that you've hit the right spot to set curvnet context in
> device_probe_and_attach().
>
> Could you try out a slightly revised verstion (attached) - this one also
> removes now redundant curvnet setting from linker routines (kldload /
> kldunload), and adds a few extra bits which might be necessary for a
> broader range of drivers to work.
>
> Note that I haven't tested this myself as I don't have a -CURRENT machine
> ATM, but a similar patch for 8.3 apparently works fine, though I don't have
> hotplugabble network cards to play with (neither cardbus nor USB)...
>
> Cheers,
>
> Marko


More information about the freebsd-hackers mailing list