Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 2010 17:14:50 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r213522 - head/sys/dev/bge
Message-ID:  <201010071714.o97HEoX9047540@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Thu Oct  7 17:14:50 2010
New Revision: 213522
URL: http://svn.freebsd.org/changeset/base/213522

Log:
  Fix a long standing bug which regarded some revisions of controller
  as 5788. This caused BGE_MISC_LOCAL_CTL register is used to
  generate link state change interrupt for non-5788 controllers. The
  interrupt handler may or may not detect link state attention as
  status block wouldn't be updated when an interrupt was generated
  with BGE_MISC_LOCAL_CTL register. All controllers except 5700 and
  5788 should use host coalescing mode register to trigger an
  interrupt.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Thu Oct  7 16:35:50 2010	(r213521)
+++ head/sys/dev/bge/if_bge.c	Thu Oct  7 17:14:50 2010	(r213522)
@@ -2656,14 +2656,12 @@ bge_attach(device_t dev)
 	if (BGE_IS_5755_PLUS(sc) == 0)
 		sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG;
 
-	/*
-	 * We could possibly check for BCOM_DEVICEID_BCM5788 in bge_probe()
-	 * but I do not know the DEVICEID for the 5788M.
-	 */
-	misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
-	if (misccfg == BGE_MISCCFG_BOARD_ID_5788 ||
-	    misccfg == BGE_MISCCFG_BOARD_ID_5788M)
-		sc->bge_flags |= BGE_FLAG_5788;
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {
+		misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
+		if (misccfg == BGE_MISCCFG_BOARD_ID_5788 ||
+		    misccfg == BGE_MISCCFG_BOARD_ID_5788M)
+			sc->bge_flags |= BGE_FLAG_5788;
+	}
 
 	/*
 	 * Some controllers seem to require a special firmware to use



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