diff options
author | imp <imp@FreeBSD.org> | 2004-05-21 06:41:15 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2004-05-21 06:41:15 +0000 |
commit | b2f8b241079bd4e3c43d9e81a938c89cc19df41a (patch) | |
tree | efda16780d50ece99d5382142ebc4e130e60f3fc /sys/dev/pci | |
parent | fb229e54dcc73140e0eb2bffa7e684764e055643 (diff) | |
download | FreeBSD-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.c | 10 |
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); } |