quick hack to support "option VIMAGE" on USB Ethernet

YAMAMOTO Shigeru shigeru at iij.ad.jp
Tue Aug 13 04:01:43 UTC 2013


Hi all,

From: Craig Rodrigues <rodrigc at FreeBSD.org>
Subject: Re: quick hack to support "option VIMAGE" on USB Ethernet
Date: Mon, 12 Aug 2013 17:52:39 -0700
> I do not have a USB Ethernet device, and do not fully understand VIMAGE yet.
> Is your patch still necessary in CURRENT, after this patch was applied to
> subr_bus.c?
> 
> http://lists.freebsd.org/pipermail/svn-src-all/2013-July/071878.html

I make a patch for r254236 at HEAD which is newer than r253346.

My try is,
1) I try to enable "option VIMAGE" at r254236 at HEAD.
It causes panic at accessing V_if_index in ifindex_alloc_locked().

2) I try to protect if_alloc(IFT_ETHER) at ue_attach_post_task() using
 CURVNET_SET_QUIET(curvnet) and CURVNET_RESTORE().
It causes abort at CURVNET_SET_QUIET() becasue curvnet is NULL.

3) I create my patch.
It is saving curvnet at uether_ifattach() and using saved curvnet at calling
CURVNET_SET_QUIET().
It seems me work.

Thanks,
-------
YAMAMOTO Shigeru <shigeru at iij.ad.jp>


More information about the freebsd-current mailing list