svn commit: r230399 - projects/armv6/sys/nfs
Olivier Houchard
cognet at FreeBSD.org
Fri Jan 20 22:31:53 UTC 2012
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: "
More information about the svn-src-projects
mailing list