Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2012 06:56:38 +0000 (UTC)
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233991 - head/sys/dev/smc
Message-ID:  <201204070656.q376ucfP048056@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204070656.q376ucfP048056>