From owner-svn-src-all@FreeBSD.ORG Mon Mar 19 02:10:41 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 09591106564A; Mon, 19 Mar 2012 02:10:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8FB18FC08; Mon, 19 Mar 2012 02:10:40 +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 q2J2AeFm046255; Mon, 19 Mar 2012 02:10:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2J2Aebq046253; Mon, 19 Mar 2012 02:10:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203190210.q2J2Aebq046253@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Mar 2012 02:10:40 +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: r233158 - head/sys/dev/fxp 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: Mon, 19 Mar 2012 02:10:41 -0000 Author: yongari Date: Mon Mar 19 02:10:40 2012 New Revision: 233158 URL: http://svn.freebsd.org/changeset/base/233158 Log: Do not change current media when driver is already running. If driver is running driver would have already completed flow control configuration. This change removes unnecessary media changes in controller reconfiguration cases such that it does not trigger link reestablishment for configuration change requests like promiscuous mode change. Reported by: Many Tested by: Mike Tancsa sentex dot net> MFC after: 1 week Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Mon Mar 19 01:57:14 2012 (r233157) +++ head/sys/dev/fxp/if_fxp.c Mon Mar 19 02:10:40 2012 (r233158) @@ -902,7 +902,7 @@ fxp_attach(device_t dev) FXP_LOCK(sc); /* Clear wakeup events. */ CSR_WRITE_1(sc, FXP_CSR_PMDR, CSR_READ_1(sc, FXP_CSR_PMDR)); - fxp_init_body(sc, 1); + fxp_init_body(sc, 0); fxp_stop(sc); FXP_UNLOCK(sc); } @@ -2810,7 +2810,7 @@ fxp_ioctl(struct ifnet *ifp, u_long comm if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) && ((ifp->if_flags ^ sc->if_flags) & (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0) - fxp_init_body(sc, 1); + fxp_init_body(sc, 0); else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) fxp_init_body(sc, 1); } else { @@ -2916,7 +2916,7 @@ fxp_ioctl(struct ifnet *ifp, u_long comm reinit++; } if (reinit > 0 && ifp->if_flags & IFF_UP) - fxp_init_body(sc, 1); + fxp_init_body(sc, 0); FXP_UNLOCK(sc); VLAN_CAPABILITIES(ifp); break;