Date: Tue, 17 Feb 2009 10:13:58 +0900 From: Pyun YongHyeon <pyunyh@gmail.com> To: Garrett Cooper <yanefbsd@gmail.com> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: Annoyance with recent parallelism in rc.d Message-ID: <20090217011358.GC23900@michelle.cdnetworks.co.kr> In-Reply-To: <7d6fde3d0902150028n5f07ee55mc6026e1e4935eeb0@mail.gmail.com> References: <7d6fde3d0902150028n5f07ee55mc6026e1e4935eeb0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Feb 15, 2009 at 12:28:20AM -0800, Garrett Cooper wrote: > I just updated my world to a recent snapshot (a build from last week) > and I'm noting some parallelism / backgrounding which is really > causing issues with my NIC and NFS mounts. I had to hit CTRL-D 5 times > in order to get the system to come up because it couldn't resolve my > NFS server's hostname, because the NIC wasn't up and going yet (as it > uses the DHCP client in background mode due to the new default). > > Now I realize that this all ties back into the issue with the NIC > (which I've approached Pyun about, and which I appreciate his help is > solving issues with this buggy chipset), but is there really a need Would you try attached patch? I don't like the patch but it may reduce number of link state change message generated by dhclient. > for parallelism at startup rc.d it can't properly detect dependencies > with some cases like NFS mounts? > > Thanks, > -Garrett --SLDf9lqlvOQaIe6s Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="msk.link.diff" Index: sys/dev/msk/if_msk.c =================================================================== --- sys/dev/msk/if_msk.c (revision 188700) +++ sys/dev/msk/if_msk.c (working copy) @@ -943,8 +943,11 @@ else { MSK_IF_LOCK(sc_if); ifp->if_mtu = ifr->ifr_mtu; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + if ((ifp->if_drv_flags & + IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); + } MSK_IF_UNLOCK(sc_if); } } @@ -2726,6 +2729,7 @@ if_printf(sc_if->msk_ifp, "watchdog timeout " "(missed link)\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); return; } @@ -2750,6 +2754,7 @@ if_printf(ifp, "watchdog timeout\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue(taskqueue_fast, &sc_if->msk_tx_task); @@ -2828,8 +2833,10 @@ mskc_reset(sc); for (i = 0; i < sc->msk_num_port; i++) { if (sc->msk_if[i] != NULL && sc->msk_if[i]->msk_ifp != NULL && - ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) + ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) { + sc->msk_if[i]->msk_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc->msk_if[i]); + } } sc->msk_suspended = 0; @@ -3515,6 +3522,9 @@ sc = sc_if->msk_softc; mii = device_get_softc(sc_if->msk_miibus); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + error = 0; /* Cancel pending I/O and free all Rx/Tx buffers. */ msk_stop(sc_if); --SLDf9lqlvOQaIe6s--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090217011358.GC23900>