diff options
author | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-01-10 19:59:20 +0000 |
---|---|---|
committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-01-10 19:59:20 +0000 |
commit | a1ffee8468932568dbb41bc354a74c56abc5fe82 (patch) | |
tree | 280ce19f62a3c447c5cf0e2854eb6d7223df0f46 | |
parent | 53ceafda2d07f27abffc122ff3a7a125c79b0323 (diff) | |
download | src-a1ffee8468932568dbb41bc354a74c56abc5fe82.tar.gz src-a1ffee8468932568dbb41bc354a74c56abc5fe82.zip |
MFC r217226:
Apply DMA address space restriction to controllers that have 4GB
DMA boundary bug and runs with PCI-X mode. watchdog timeout was
observed on BCM5704 which lives behind certain PCI-X bridge(e.g.
AMD 8131 PCI-X bridge). It's still not clear whether the root
cause came from that PCI-X bridge or not. The watchdog timeout
indicates the issue is in TX path. If the bridge reorders TX
mailbox write accesses it would generate all kinds of problems but
I'm not sure. This should be revisited.
Early MFC requested by re@ for inclusion in 8.2-RC2/7.4-RC2.
Tested by: Michael L. Squires (mikes <> siralan dot org)
Approved by: re (kensmith)
Notes
Notes:
svn path=/releng/7.4/; revision=217235
-rw-r--r-- | sys/dev/bge/if_bge.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 94da0f79a8ca..f48dfbb23c9e 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -2479,8 +2479,18 @@ bge_dma_alloc(struct bge_softc *sc) /* Create parent tag for buffers. */ boundary = 0; - if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) + if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) { boundary = BGE_DMA_BNDRY; + /* + * XXX + * watchdog timeout issue was observed on BCM5704 which + * lives behind PCI-X bridge(e.g AMD 8131 PCI-X bridge). + * Limiting DMA address space to 32bits seems to address + * it. + */ + if (sc->bge_flags & BGE_FLAG_PCIX) + lowaddr = BUS_SPACE_MAXADDR_32BIT; + } error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), 1, boundary, lowaddr, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, |