From 1ec4c3a889b3ec01a7244d5bb80d4e817e0a69de Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Mon, 12 Feb 2007 23:58:52 +0000 Subject: Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver. --- sys/dev/bge/if_bge.c | 3 +++ sys/dev/bge/if_bgereg.h | 1 + 2 files changed, 4 insertions(+) (limited to 'sys/dev/bge') diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 58b5dbf9c9be..572ba466f852 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -2216,6 +2216,9 @@ bge_attach(device_t dev) } /* Set various bug flags. */ + if (sc->bge_chipid == BGE_CHIPID_BCM5701_A0 || + sc->bge_chipid == BGE_CHIPID_BCM5701_B0) + sc->bge_flags |= BGE_FLAG_CRC_BUG; if (sc->bge_chiprev == BGE_CHIPREV_5703_AX || sc->bge_chiprev == BGE_CHIPREV_5704_AX) sc->bge_flags |= BGE_FLAG_ADC_BUG; diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h index fa577a0248d2..d77bd5c4250a 100644 --- a/sys/dev/bge/if_bgereg.h +++ b/sys/dev/bge/if_bgereg.h @@ -2467,6 +2467,7 @@ struct bge_softc { #define BGE_FLAG_JITTER_BUG 0x01000000 #define BGE_FLAG_BER_BUG 0x02000000 #define BGE_FLAG_ADJUST_TRIM 0x04000000 +#define BGE_FLAG_CRC_BUG 0x08000000 uint32_t bge_chipid; uint8_t bge_asicrev; uint8_t bge_chiprev; -- cgit v1.3