summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2007-02-17 16:56:39 +0000
committersos <sos@FreeBSD.org>2007-02-17 16:56:39 +0000
commited5cb12fbe994c362c4ab2d40dd8be72d4a364cc (patch)
tree31424ae52139540ad3eabf13397afd2881b3526c /sys/dev/pci
parentf6f8eb8e88eb2140016fa12c1edf6947d949e048 (diff)
downloadFreeBSD-src-ed5cb12fbe994c362c4ab2d40dd8be72d4a364cc.zip
FreeBSD-src-ed5cb12fbe994c362c4ab2d40dd8be72d4a364cc.tar.gz
Add support for chipsets that has NULL'd BAR's for legacy ports.
This allows DMA to be used on a fine little geode system I got here and most like on lots of older systems like that. HW donated by: Paul Ghering
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index fae9ba2..dd55f16 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -2231,7 +2231,9 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask)
/* ATA devices needs special map treatment */
if ((pci_get_class(dev) == PCIC_STORAGE) &&
(pci_get_subclass(dev) == PCIS_STORAGE_IDE) &&
- (pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV))
+ ((pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV) ||
+ (!pci_read_config(dev, PCIR_BAR(0), 4) &&
+ !pci_read_config(dev, PCIR_BAR(2), 4))) )
pci_ata_maps(pcib, bus, dev, b, s, f, rl, force, prefetchmask);
else
for (i = 0; i < cfg->nummaps;)
OpenPOWER on IntegriCloud