svn commit: r211374 - stable/7/sys/dev/bge
Pyun YongHyeon
yongari at FreeBSD.org
Sun Aug 15 22:59:36 UTC 2010
Author: yongari
Date: Sun Aug 15 22:59:35 2010
New Revision: 211374
URL: http://svn.freebsd.org/changeset/base/211374
Log:
MFC r210083,210152:
r210083:
Remove enabling Data FIFO protection with indirect memory access.
r165114 added that code and that change ignored the same logic
committed in r135772. In addition, data FIFO protection should be
selectively enabled instead of applying to all PCIe devices.
While I'm here add BCM5785 to devices that do not require this
fix.
r210152:
Use Miscellaneous Configuration Register bit definition instead of
magic number.
Modified:
stable/7/sys/dev/bge/if_bge.c
stable/7/sys/dev/bge/if_bgereg.h
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/dev/bge/if_bge.c
==============================================================================
--- stable/7/sys/dev/bge/if_bge.c Sun Aug 15 22:57:50 2010 (r211373)
+++ stable/7/sys/dev/bge/if_bge.c Sun Aug 15 22:59:35 2010 (r211374)
@@ -3143,7 +3143,7 @@ bge_reset(struct bge_softc *sc)
* powered up in D0 uninitialized.
*/
if (BGE_IS_5705_PLUS(sc))
- reset |= 0x04000000;
+ reset |= BGE_MISCCFG_GPHY_PD_OVERRIDE;
/* Issue global reset */
write_op(sc, BGE_MISC_CFG, reset);
@@ -3272,11 +3272,6 @@ bge_reset(struct bge_softc *sc)
DELAY(10);
}
- if (sc->bge_flags & BGE_FLAG_PCIE) {
- reset = bge_readmem_ind(sc, 0x7C00);
- bge_writemem_ind(sc, 0x7C00, reset | (1 << 25));
- }
-
/* Fix up byte swapping. */
CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS |
BGE_MODECTL_BYTESWAP_DATA);
@@ -3301,7 +3296,9 @@ bge_reset(struct bge_softc *sc)
/* XXX: Broadcom Linux driver. */
if (sc->bge_flags & BGE_FLAG_PCIE &&
- sc->bge_chipid != BGE_CHIPID_BCM5750_A0) {
+ sc->bge_chipid != BGE_CHIPID_BCM5750_A0 &&
+ sc->bge_asicrev != BGE_ASICREV_BCM5785) {
+ /* Enable Data FIFO protection. */
val = CSR_READ_4(sc, 0x7C00);
CSR_WRITE_4(sc, 0x7C00, val | (1 << 25));
}
Modified: stable/7/sys/dev/bge/if_bgereg.h
==============================================================================
--- stable/7/sys/dev/bge/if_bgereg.h Sun Aug 15 22:57:50 2010 (r211373)
+++ stable/7/sys/dev/bge/if_bgereg.h Sun Aug 15 22:59:35 2010 (r211374)
@@ -1823,6 +1823,7 @@
#define BGE_MISCCFG_BOARD_ID_5788 0x00010000
#define BGE_MISCCFG_BOARD_ID_5788M 0x00018000
#define BGE_MISCCFG_EPHY_IDDQ 0x00200000
+#define BGE_MISCCFG_GPHY_PD_OVERRIDE 0x04000000
#define BGE_32BITTIME_66MHZ (0x41 << 1)
More information about the svn-src-stable-7
mailing list