diff options
author | sos <sos@FreeBSD.org> | 2004-04-24 16:32:06 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2004-04-24 16:32:06 +0000 |
commit | 70a39823c76d77cbbadb3639eae5d6a9ee29868e (patch) | |
tree | fdb3f597a127c5deaaac49366373405daa94dd07 /sys/dev/ata | |
parent | 4c2bf4f1b4ce666c9c869253d951b4da1b23d33e (diff) | |
download | FreeBSD-src-70a39823c76d77cbbadb3639eae5d6a9ee29868e.zip FreeBSD-src-70a39823c76d77cbbadb3639eae5d6a9ee29868e.tar.gz |
Try the simplify determining what is ata0 and ata1.
Remove the PCI native addressing code, it eed to be run before we even
have control in the ATA driver and should be moved to the pci code.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-pci.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index 7a5cb75..d6519cd 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -177,25 +177,9 @@ ata_pci_attach(device_t dev) ctlr->locking = ata_pci_locknoop; progif = pci_read_config(dev, PCIR_PROGIF, 1); - if ((progif & 0x85) == 0x80) + if ((progif & 0x80)) prisec = 1; - /* if this device supports PCI native addressing use it */ -#if 0 - if ((progif & 0x8a) == 0x8a) { - if (pci_read_config(dev, PCIR_BAR(0), 4) && - pci_read_config(dev, PCIR_BAR(2), 4)) { - device_printf(dev, "setting native PCI addressing mode "); - pci_write_config(dev, PCIR_PROGIF, progif | 0x05, 1); - if ((pci_read_config(dev, PCIR_PROGIF, 1) & 0x05) != 0x05) { - pci_write_config(dev, PCIR_PROGIF, progif & ~0x05, 1); - printf("failed, using compat method\n"); - } - else - printf("succeded\n"); - } - } -#endif /* if needed try to enable busmastering */ cmd = pci_read_config(dev, PCIR_COMMAND, 2); if (!(cmd & PCIM_CMD_BUSMASTEREN)) { |