diff options
author | stas <stas@FreeBSD.org> | 2012-04-07 06:56:38 +0000 |
---|---|---|
committer | stas <stas@FreeBSD.org> | 2012-04-07 06:56:38 +0000 |
commit | 1c82d1d4eb7185c67fbfeb2bae5c59827856970e (patch) | |
tree | 98a7f123e758920e4f6d7df3effa30e7313913b8 /sys/dev/smc | |
parent | 1e4ae572e54eb1ca9e972fb19aefc3266395755b (diff) | |
download | FreeBSD-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.
Diffstat (limited to 'sys/dev/smc')
-rw-r--r-- | sys/dev/smc/if_smc.c | 5 |
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); |