svn commit: r233991 - head/sys/dev/smc

Stanislav Sedov stas at FreeBSD.org
Sat Apr 7 06:56:39 UTC 2012


Author: stas
Date: Sat Apr  7 06:56:38 2012
New Revision: 233991
URL: http://svn.freebsd.org/changeset/base/233991

Log:
  - 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.

Modified:
  head/sys/dev/smc/if_smc.c

Modified: head/sys/dev/smc/if_smc.c
==============================================================================
--- head/sys/dev/smc/if_smc.c	Sat Apr  7 05:51:43 2012	(r233990)
+++ head/sys/dev/smc/if_smc.c	Sat Apr  7 06:56:38 2012	(r233991)
@@ -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);


More information about the svn-src-head mailing list