aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 16:22:16 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 16:22:16 -0700
commitfee02f80e68abbcc45ed3c5dd5ed09d04a284791 (patch)
tree6858df38d1fa451d8ce309fc8c238a6bc71f7629 /drivers/net/tg3.c
parent4f58802fae8a51d9e79454746584175c14f84519 (diff)
parented7fce6c13bdd802817e1988d67047d432e7e30b (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/tg3-2.6
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e944aac258e..a0b8848049c 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -66,8 +66,8 @@
#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
-#define DRV_MODULE_VERSION "3.30"
-#define DRV_MODULE_RELDATE "June 6, 2005"
+#define DRV_MODULE_VERSION "3.31"
+#define DRV_MODULE_RELDATE "June 8, 2005"
#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
@@ -9695,10 +9695,24 @@ static int __devinit tg3_test_dma(struct tg3 *tp)
}
if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) !=
DMA_RWCTRL_WRITE_BNDRY_16) {
+ static struct pci_device_id dma_wait_state_chipsets[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_APPLE,
+ PCI_DEVICE_ID_APPLE_UNI_N_PCI15) },
+ { },
+ };
+
/* DMA test passed without adjusting DMA boundary,
- * just restore the calculated DMA boundary
+ * now look for chipsets that are known to expose the
+ * DMA bug without failing the test.
*/
- tp->dma_rwctrl = saved_dma_rwctrl;
+ if (pci_dev_present(dma_wait_state_chipsets)) {
+ tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK;
+ tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16;
+ }
+ else
+ /* Safe to use the calculated DMA boundary. */
+ tp->dma_rwctrl = saved_dma_rwctrl;
+
tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
}