From owner-svn-src-all@FreeBSD.ORG Wed Mar 28 01:52: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 7587D106566B; Wed, 28 Mar 2012 01:52:39 +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 612388FC1B; Wed, 28 Mar 2012 01:52: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 q2S1qd9L012890; Wed, 28 Mar 2012 01:52:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2S1qdhh012888; Wed, 28 Mar 2012 01:52:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203280152.q2S1qdhh012888@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 28 Mar 2012 01:52:39 +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: r233587 - 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: Wed, 28 Mar 2012 01:52:39 -0000 Author: yongari Date: Wed Mar 28 01:52:38 2012 New Revision: 233587 URL: http://svn.freebsd.org/changeset/base/233587 Log: Remove unnecessary #if as the software workaround for PCI protocol violation should be activated unless the system is cold-booted after updating EEPROM. The PCI protocol violation happens only when established link is 10Mbps so the workaround should be updated whenever link state change is detected. Previously the workaround was activated only when user checks current media status with ifconfig(8). Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Wed Mar 28 01:27:27 2012 (r233586) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 28 01:52:38 2012 (r233587) @@ -592,13 +592,11 @@ fxp_attach(device_t dev) "EEPROM checksum @ 0x%x: 0x%x -> 0x%x\n", i, sc->eeprom[i], cksum); sc->eeprom[i] = cksum; -#if 1 /* * If the user elects to continue, try the software * workaround, as it is better than nothing. */ sc->flags |= FXP_FLAG_CU_RESUME_BUG; -#endif } } @@ -2611,12 +2609,6 @@ fxp_ifmedia_sts(struct ifnet *ifp, struc mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; - - if (IFM_SUBTYPE(ifmr->ifm_active) == IFM_10_T && - sc->flags & FXP_FLAG_CU_RESUME_BUG) - sc->cu_resume_bug = 1; - else - sc->cu_resume_bug = 0; FXP_UNLOCK(sc); } @@ -2809,6 +2801,11 @@ fxp_miibus_statchg(device_t dev) (IFM_AVALID | IFM_ACTIVE)) return; + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_10_T && + sc->flags & FXP_FLAG_CU_RESUME_BUG) + sc->cu_resume_bug = 1; + else + sc->cu_resume_bug = 0; /* * Call fxp_init_body in order to adjust the flow control settings. * Note that the 82557 doesn't support hardware flow control.