From 494377df3d97828fa45839beee722c4b3902eefc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Sat, 24 Apr 2004 16:32:06 +0000 Subject: [PATCH] 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. --- sys/dev/ata/ata-pci.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index 7a5cb752651..d6519cde349 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)) {