From 8287860e0452edc2c041a048a5e4f4797e273c79 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Sun, 22 Sep 2002 18:27:29 +0000 Subject: [PATCH] Set up the BCM570x chip's DMA Read/Write Control register more correctly. This fixes the "watchdog timeout -- resetting" errors seen on Dell 2650 systems. MFC after: 1 month --- sys/dev/bge/if_bge.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index d3771f9f2bba..b1122420ec98 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1017,8 +1017,16 @@ bge_chipinit(sc) BGE_MEMWIN_WRITE(sc, i, 0); /* Set up the PCI DMA control register. */ - pci_write_config(sc->bge_dev, BGE_PCI_DMA_RW_CTL, - BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD|0x0F, 4); + if (pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4) & + BGE_PCISTATE_PCI_BUSMODE) { + /* Conventional PCI bus */ + pci_write_config(sc->bge_dev, BGE_PCI_DMA_RW_CTL, + BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD|0x3F000F, 4); + } else { + /* PCI-X bus */ + pci_write_config(sc->bge_dev, BGE_PCI_DMA_RW_CTL, + BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD|0x1B000F, 4); + } /* * Set up general mode register.