summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2012-04-07 06:56:38 +0000
committerstas <stas@FreeBSD.org>2012-04-07 06:56:38 +0000
commit1c82d1d4eb7185c67fbfeb2bae5c59827856970e (patch)
tree98a7f123e758920e4f6d7df3effa30e7313913b8
parent1e4ae572e54eb1ca9e972fb19aefc3266395755b (diff)
downloadFreeBSD-src-1c82d1d4eb7185c67fbfeb2bae5c59827856970e.zip
FreeBSD-src-1c82d1d4eb7185c67fbfeb2bae5c59827856970e.tar.gz
- 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.
-rw-r--r--sys/dev/smc/if_smc.c5
1 files 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);
OpenPOWER on IntegriCloud