summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-10-22 19:30:56 +0000
committeryongari <yongari@FreeBSD.org>2010-10-22 19:30:56 +0000
commitabd7e035f42d97e8ed1cf068da8a8b08179cf3d4 (patch)
tree72bb413d2823a23883b3aa78a685df6fcfed135f /sys/dev/bge
parentf5df7c7995b0bdeaaa3681ba58cdf8b1a8e098cc (diff)
downloadFreeBSD-src-abd7e035f42d97e8ed1cf068da8a8b08179cf3d4.zip
FreeBSD-src-abd7e035f42d97e8ed1cf068da8a8b08179cf3d4.tar.gz
Add workaround for BCM5906 A1 controller silicon bug. When
auto-negotiation results in half-duplex operation, excess collision on the ethernet link may cause internal chip delays that may result in subsequent valid frames being dropped due to insufficient receive buffer resources. The workaround is to choose de-pipeline method as a flow control decision for SDI. De-pipeline method allows only 1 data in TxMbuf at a time such that a request to RDMA from SDI is made only when TxMbuf is empty. Thanks for david for providing detailed errata information.
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c5
-rw-r--r--sys/dev/bge/if_bgereg.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 139df3d..95de34c 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -1693,6 +1693,11 @@ bge_blockinit(struct bge_softc *sc)
bge_writembx(sc, BGE_MBX_RX_MINI_PROD_LO, 0);
}
+ /* Choose de-pipeline mode for BCM5906 A1. */
+ if (sc->bge_asicrev == BGE_ASICREV_BCM5906 &&
+ sc->bge_chiprev == BGE_CHIPID_BCM5906_A1)
+ CSR_WRITE_4(sc, BGE_ISO_PKT_TX,
+ (CSR_READ_4(sc, BGE_ISO_PKT_TX) & ~3) | 2);
/*
* The BD ring replenish thresholds control how often the
* hardware fetches new BD's from the producer rings in host
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 8211df1..a4f3f83 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -880,6 +880,7 @@
#define BGE_SDI_STATS_CTL 0x0C08
#define BGE_SDI_STATS_ENABLE_MASK 0x0C0C
#define BGE_SDI_STATS_INCREMENT_MASK 0x0C10
+#define BGE_ISO_PKT_TX 0x0C20
#define BGE_LOCSTATS_COS0 0x0C80
#define BGE_LOCSTATS_COS1 0x0C84
#define BGE_LOCSTATS_COS2 0x0C88
OpenPOWER on IntegriCloud