From owner-svn-src-all@FreeBSD.ORG Sat Apr 7 06:56:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FC11106566B; Sat, 7 Apr 2012 06:56:39 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BBE28FC0C; Sat, 7 Apr 2012 06:56:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q376udQE048058; Sat, 7 Apr 2012 06:56:39 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q376ucfP048056; Sat, 7 Apr 2012 06:56:38 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204070656.q376ucfP048056@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 7 Apr 2012 06:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233991 - head/sys/dev/smc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2012 06:56:39 -0000 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);