summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2004-05-21 06:41:15 +0000
committerimp <imp@FreeBSD.org>2004-05-21 06:41:15 +0000
commitb2f8b241079bd4e3c43d9e81a938c89cc19df41a (patch)
treeefda16780d50ece99d5382142ebc4e130e60f3fc /sys/dev/pci
parentfb229e54dcc73140e0eb2bffa7e684764e055643 (diff)
downloadFreeBSD-src-b2f8b241079bd4e3c43d9e81a938c89cc19df41a.zip
FreeBSD-src-b2f8b241079bd4e3c43d9e81a938c89cc19df41a.tar.gz
MFp4:
Split the baby. For idepci devices, now both legacy mode bits need not be set. We can run an idepci in a split mode. However, it only works better than before, not works. It works better in that when one device is legacy and the other isn't and disabled, we now operate correctly. sos submitted a version of this patch.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 61ac415..b5be9a7 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -849,9 +849,7 @@ pci_is_ata_legacy(device_t dev)
*/
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_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)))
+ (pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV))
return 1;
return 0;
}
@@ -887,6 +885,9 @@ pci_add_ata_legacy_maps(device_t pcib, device_t bus, device_t dev, int b,
resource_list_add(rl, type, rid, 0x3f6, 0x3f6, 1);
resource_list_alloc(rl, bus, dev, type, &rid, 0x3f6, 0x3f6, 1,
0);
+ } else {
+ pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(0), rl);
+ pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(1), rl);
}
if ((pci_get_progif(dev) & PCIP_STORAGE_IDE_MODESEC) == 0) {
rid = PCIR_BAR(2);
@@ -897,6 +898,9 @@ pci_add_ata_legacy_maps(device_t pcib, device_t bus, device_t dev, int b,
resource_list_add(rl, type, rid, 0x376, 0x376, 1);
resource_list_alloc(rl, bus, dev, type, &rid, 0x376, 0x376, 1,
0);
+ } else {
+ pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(2), rl);
+ pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(3), rl);
}
pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(4), rl);
}
OpenPOWER on IntegriCloud