diff options
author | yongari <yongari@FreeBSD.org> | 2010-10-07 17:14:50 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2010-10-07 17:14:50 +0000 |
commit | cb37c49112ac21a1d5b1708ac2cb34fa297589dd (patch) | |
tree | 0d83b525646e13607ff42b9c2f37f6045f0851db /sys/dev/bge | |
parent | b6e8ecf1c71e8890786926c3b93bfc19eca593af (diff) | |
download | FreeBSD-src-cb37c49112ac21a1d5b1708ac2cb34fa297589dd.zip FreeBSD-src-cb37c49112ac21a1d5b1708ac2cb34fa297589dd.tar.gz |
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.
Diffstat (limited to 'sys/dev/bge')
-rw-r--r-- | sys/dev/bge/if_bge.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 50f8888..9b2bdac 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -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 |