From owner-svn-src-projects@FreeBSD.ORG Fri Jan 20 22:31:52 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4C701065674; Fri, 20 Jan 2012 22:31:52 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D41E98FC0C; Fri, 20 Jan 2012 22:31:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0KMVq89061713; Fri, 20 Jan 2012 22:31:52 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0KMVqlt061711; Fri, 20 Jan 2012 22:31:52 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201201202231.q0KMVqlt061711@svn.freebsd.org> From: Olivier Houchard Date: Fri, 20 Jan 2012 22:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230399 - projects/armv6/sys/nfs X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 22:31:53 -0000 Author: cognet Date: Fri Jan 20 22:31:52 2012 New Revision: 230399 URL: http://svn.freebsd.org/changeset/base/230399 Log: Wait a bit for the USB ethernet interfaces to show up, in case we want to netboot Modified: projects/armv6/sys/nfs/bootp_subr.c Modified: projects/armv6/sys/nfs/bootp_subr.c ============================================================================== --- projects/armv6/sys/nfs/bootp_subr.c Fri Jan 20 22:24:39 2012 (r230398) +++ projects/armv6/sys/nfs/bootp_subr.c Fri Jan 20 22:31:52 2012 (r230399) @@ -1604,6 +1604,7 @@ bootpc_init(void) #endif struct nfsv3_diskless *nd; struct thread *td; + int count = 0; nd = &nfsv3_diskless; td = curthread; @@ -1651,6 +1652,7 @@ bootpc_init(void) allocifctx(gctx); #endif +retry: IFNET_RLOCK(); for (ifp = TAILQ_FIRST(&V_ifnet), ifctx = gctx->interfaces; ifp != NULL && ifctx != NULL; @@ -1674,6 +1676,10 @@ bootpc_init(void) CURVNET_RESTORE(); if (gctx->interfaces == NULL || gctx->interfaces->ifp == NULL) { + if (count < 1000) { + pause("bootpc", hz / 10); + goto retry; + } #ifdef BOOTP_WIRED_TO panic("bootpc_init: Could not find interface specified " "by BOOTP_WIRED_TO: "