summaryrefslogtreecommitdiffstats
path: root/sys/dev/cardbus/cardbus_cis.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2002-11-13 22:53:48 +0000
committerscottl <scottl@FreeBSD.org>2002-11-13 22:53:48 +0000
commit87416e10edff8b02b89cf2766321a8c3676bf84b (patch)
treef81887ddcfa4d07b94fe9101a46477d91edff505 /sys/dev/cardbus/cardbus_cis.c
parent98ad81f640bacc1fe9ec61788a2061493ff9d5fd (diff)
downloadFreeBSD-src-87416e10edff8b02b89cf2766321a8c3676bf84b.zip
FreeBSD-src-87416e10edff8b02b89cf2766321a8c3676bf84b.tar.gz
When parsing the CIS, if a BAR tuple is encountered, enable the corresponding
bit in the PCI command register for the device. Otherwise, device drivers that look at this register to see which types of BARs are usable will think that none of them are. This allows my Adaptec 1480A cardbus card to finally work. Reviewed by: imp
Diffstat (limited to 'sys/dev/cardbus/cardbus_cis.c')
-rw-r--r--sys/dev/cardbus/cardbus_cis.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c
index c313745..d6cf069 100644
--- a/sys/dev/cardbus/cardbus_cis.c
+++ b/sys/dev/cardbus/cardbus_cis.c
@@ -307,6 +307,11 @@ DECODE_PROTOTYPE(bar)
resource_list_add(&dinfo->pci.resources, type, bar, 0UL, ~0UL, len);
+ /*
+ * Mark the appropriate bit in the PCI command register so that
+ * device drivers will know which BARs can be used.
+ */
+ pci_enable_io(child, type);
return (0);
}
OpenPOWER on IntegriCloud