Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Nov 2013 08:46:50 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r257623 - stable/10/sys/dev/bce
Message-ID:  <201311040846.rA48koRP083230@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon Nov  4 08:46:50 2013
New Revision: 257623
URL: http://svnweb.freebsd.org/changeset/base/257623

Log:
  MFC r257307:
    Fix regression introduced in r235816.
    r235816 triggered kernel panic or hang after warm boot.
    Don't blindly restore BCE_EMAC_MODE media configuration in
    bce_reset().  If driver is about to shutdown it will invoke
    bce_reset() which in turn results in restoring BCE_EMAC_MODE
    media configuration.  This operation seems to confuse controller
    firmware.
  Approved by:	re (glebius)

Modified:
  stable/10/sys/dev/bce/if_bce.c
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/dev/bce/if_bce.c
==============================================================================
--- stable/10/sys/dev/bce/if_bce.c	Mon Nov  4 08:24:22 2013	(r257622)
+++ stable/10/sys/dev/bce/if_bce.c	Mon Nov  4 08:46:50 2013	(r257623)
@@ -5064,9 +5064,11 @@ bce_reset(struct bce_softc *sc, u32 rese
 
 bce_reset_exit:
 	/* Restore EMAC Mode bits needed to keep ASF/IPMI running. */
-	val = REG_RD(sc, BCE_EMAC_MODE);
-	val = (val & ~emac_mode_mask) | emac_mode_save;
-	REG_WR(sc, BCE_EMAC_MODE, val);
+	if (reset_code == BCE_DRV_MSG_CODE_RESET) {
+		val = REG_RD(sc, BCE_EMAC_MODE);
+		val = (val & ~emac_mode_mask) | emac_mode_save;
+		REG_WR(sc, BCE_EMAC_MODE, val);
+	}
 
 	DBEXIT(BCE_VERBOSE_RESET);
 	return (rc);



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