[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-24
Subject: [TG3]: Correct MIN_DMA and ONE_DMA settings in dma_rwctrl.
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2003-01-30 22:53:42
[Download RAW message or body]
ChangeSet 1.953.2.4, 2003/01/30 14:53:42-08:00, davem@nuts.ninka.net
[TG3]: Correct MIN_DMA and ONE_DMA settings in dma_rwctrl.
# This patch includes the following deltas:
# ChangeSet 1.953.2.3 -> 1.953.2.4
# drivers/net/tg3.c 1.49 -> 1.50
#
tg3.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c Mon Feb 3 21:33:13 2003
+++ b/drivers/net/tg3.c Mon Feb 3 21:33:13 2003
@@ -6338,6 +6338,7 @@
(0x7 << DMA_RWCTRL_WRITE_WATER_SHIFT) |
(0x7 << DMA_RWCTRL_READ_WATER_SHIFT) |
(0x0f << DMA_RWCTRL_MIN_DMA_SHIFT);
+ /* XXX 5705 note: set MIN_DMA to zero here */
} else {
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)
tp->dma_rwctrl =
@@ -6355,12 +6356,19 @@
(0x0f << DMA_RWCTRL_MIN_DMA_SHIFT);
/* Wheee, some more chip bugs... */
- if (tp->pci_chip_rev_id == CHIPREV_ID_5703_A1 ||
- tp->pci_chip_rev_id == CHIPREV_ID_5703_A2 ||
- tp->pci_chip_rev_id == CHIPREV_ID_5703_A3 ||
- tp->pci_chip_rev_id == CHIPREV_ID_5704_A0)
- tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA;
+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
+ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
+ u32 ccval = (tr32(TG3PCI_CLOCK_CTRL) & 0x1f);
+
+ if (ccval == 0x6 || ccval == 0x7)
+ tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA;
+ }
}
+
+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
+ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)
+ tp->dma_rwctrl &= ~(DMA_RWCTRL_MIN_DMA
+ << DMA_RWCTRL_MIN_DMA_SHIFT);
/* We don't do this on x86 because it seems to hurt performace.
* It does help things on other platforms though.
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic