From 1c82d1d4eb7185c67fbfeb2bae5c59827856970e Mon Sep 17 00:00:00 2001 From: stas Date: Sat, 7 Apr 2012 06:56:38 +0000 Subject: - Do not reinitialize the card if it is already running. This fixes bootp on if_smc, as bootp code perform SIOCSIFADDR ioctl call immediately after sending the request (which causes if_init being called) which causes the adapter to drop all the packets received in the meantime. --- sys/dev/smc/if_smc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/smc/if_smc.c b/sys/dev/smc/if_smc.c index 9404f56..cece5b7 100644 --- a/sys/dev/smc/if_smc.c +++ b/sys/dev/smc/if_smc.c @@ -1237,9 +1237,10 @@ smc_init_locked(struct smc_softc *sc) { struct ifnet *ifp; - ifp = sc->smc_ifp; - SMC_ASSERT_LOCKED(sc); + ifp = sc->smc_ifp; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; smc_reset(sc); smc_enable(sc); -- cgit v1.1