From 08bf8bb7c1f20c3d338970bdcadb4555e6d88c94 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Mon, 12 Feb 2007 22:51:25 +0000 Subject: Add PHY DSP code for BCM5755M. Obtained from: OpenBSD --- sys/dev/bge/if_bge.c | 5 ++++- sys/dev/bge/if_bgereg.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev/bge') diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index f1ba0a495ccc..838f6ad7d537 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1687,6 +1687,8 @@ bge_probe(device_t dev) device_set_desc_copy(dev, buf); if (pci_get_subvendor(dev) == DELL_VENDORID) sc->bge_flags |= BGE_FLAG_NO_3LED; + if (did == BCOM_DEVICEID_BCM5755M) + sc->bge_flags |= BGE_FLAG_ADJUST_TRIM; return (0); } t++; @@ -2219,7 +2221,8 @@ bge_attach(device_t dev) sc->bge_flags |= BGE_FLAG_ADC_BUG; if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0) sc->bge_flags |= BGE_FLAG_5704_A0_BUG; - if (BGE_IS_5705_PLUS(sc)) { + if (BGE_IS_5705_PLUS(sc) && + !(sc->bge_flags & BGE_FLAG_ADJUST_TRIM)) { if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || sc->bge_asicrev == BGE_ASICREV_BCM5787) sc->bge_flags |= BGE_FLAG_JITTER_BUG; diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h index 80a04f67126a..a25b6afee086 100644 --- a/sys/dev/bge/if_bgereg.h +++ b/sys/dev/bge/if_bgereg.h @@ -2463,6 +2463,7 @@ struct bge_softc { #define BGE_FLAG_5704_A0_BUG 0x00800000 #define BGE_FLAG_JITTER_BUG 0x01000000 #define BGE_FLAG_BER_BUG 0x02000000 +#define BGE_FLAG_ADJUST_TRIM 0x04000000 uint32_t bge_chipid; uint8_t bge_asicrev; uint8_t bge_chiprev; -- cgit v1.3