Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci In the BCM5703, the DMA read watermark should be...
details: https://anonhg.NetBSD.org/src/rev/5674ed3ee80d
branches: trunk
changeset: 331186:5674ed3ee80d
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Aug 05 04:29:01 2014 +0000
description:
In the BCM5703, the DMA read watermark should be set to less than
or equal to the maximum memory read byte count of the PCI-X command
register. Same as FreeBSD r204978 and Linux tg3 driver.
diffstat:
sys/dev/pci/if_bge.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r f089c1919ca3 -r 5674ed3ee80d sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Mon Aug 04 23:31:36 2014 +0000
+++ b/sys/dev/pci/if_bge.c Tue Aug 05 04:29:01 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.275 2014/07/24 13:22:49 msaitoh Exp $ */
+/* $NetBSD: if_bge.c,v 1.276 2014/08/05 04:29:01 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.275 2014/07/24 13:22:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.276 2014/08/05 04:29:01 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2369,6 +2369,15 @@
dma_rw_ctl |= BGE_PCIDMARWCTL_ONEDMA_ATONCE_GLOBAL;
else
dma_rw_ctl |= BGE_PCIDMARWCTL_ONEDMA_ATONCE_LOCAL;
+ } else if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5703) {
+ /*
+ * In the BCM5703, the DMA read watermark should
+ * be set to less than or equal to the maximum
+ * memory read byte count of the PCI-X command
+ * register.
+ */
+ dma_rw_ctl |= BGE_PCIDMARWCTL_RD_WAT_SHIFT(4) |
+ BGE_PCIDMARWCTL_WR_WAT_SHIFT(3);
} else if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5704) {
/* 1536 bytes for read, 384 bytes for write. */
dma_rw_ctl |= BGE_PCIDMARWCTL_RD_WAT_SHIFT(7) |
Home |
Main Index |
Thread Index |
Old Index