From owner-freebsd-current@FreeBSD.ORG Tue Aug 13 04:01:43 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F3EF06DC; Tue, 13 Aug 2013 04:01:42 +0000 (UTC) (envelope-from shigeru@iij.ad.jp) Received: from omgo.iij.ad.jp (mo00.iij.ad.jp [202.232.30.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A89E0243A; Tue, 13 Aug 2013 04:01:41 +0000 (UTC) DKIM-Signature: v=1;a=rsa-sha256;c=relaxed/simple;d=iij.ad.jp;h=Date: Message-Id:To:Cc:Subject:From:In-Reply-To:References:Mime-Version: Content-Type:Content-Transfer-Encoding;i=shigeru@iij.ad.jp;s=omgo1;t= 1376366234; x=1377575834; bh=F2GIiSiKaywxchOrUAVUQVaJgSo0/rs1kjlsENnVrdg=; b=AKK PKKA3dCScxpJTIPEEeiW0iUBYHXqVaWy0ltZKhMq8GLPdtTJll53lPCRiW7wrjPM5DRwVxWMMfKkx BNCbR44Rhtat+rkQMEqndoMOoHpe6a5AGsbbYzo3mSuZKQgFwBUunUIXLHq2KGd5hmHgo5xhs9j68 nG7rcMIte+wVWI=; Received: by omgo.iij.ad.jp (mo00) id r7D3vEl2006308; Tue, 13 Aug 2013 12:57:14 +0900 Date: Tue, 13 Aug 2013 12:57:09 +0900 (JST) Message-Id: <20130813.125709.1168850046133874829.shigeru@iij.ad.jp> To: rodrigc@FreeBSD.org Subject: Re: quick hack to support "option VIMAGE" on USB Ethernet From: YAMAMOTO Shigeru In-Reply-To: References: <20130812.124834.1287983109881683567.shigeru@iij.ad.jp> X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 04:01:43 -0000 Hi all, From: Craig Rodrigues 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@HEAD which is newer than r253346. My try is, 1) I try to enable "option VIMAGE" at r254236@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