]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-probe.c
ide: fix accidental LOCKDEP breakage caused by local_irq_set() removal
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-probe.c
index e688ca1c967c6220f6782ca6a9b7e79ad6034891..312127ea443afa6027c413fb6f8c5fb598afcbbe 100644 (file)
@@ -796,7 +796,7 @@ static int ide_probe_port(ide_hwif_t *hwif)
        if (irqd)
                disable_irq(hwif->irq);
 
-       local_irq_save(flags);
+       local_save_flags(flags);
        local_irq_enable_in_hardirq();
 
        if (ide_port_wait_ready(hwif) == -EBUSY)
@@ -849,8 +849,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
        }
 
        ide_port_for_each_dev(i, drive, hwif) {
-               if ((hwif->host_flags & IDE_HFLAG_NO_IO_32BIT) ||
-                   drive->id[ATA_ID_DWORD_IO])
+               if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT)
                        drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
                else
                        drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
@@ -1230,6 +1229,8 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
        if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0) {
                int rc;
 
+               hwif->dma_ops = d->dma_ops;
+
                if (d->init_dma)
                        rc = d->init_dma(hwif, d);
                else
@@ -1237,12 +1238,13 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
 
                if (rc < 0) {
                        printk(KERN_INFO "%s: DMA disabled\n", hwif->name);
+
+                       hwif->dma_ops = NULL;
                        hwif->dma_base = 0;
                        hwif->swdma_mask = 0;
                        hwif->mwdma_mask = 0;
                        hwif->ultra_mask = 0;
-               } else if (d->dma_ops)
-                       hwif->dma_ops = d->dma_ops;
+               }
        }
 
        if ((d->host_flags & IDE_HFLAG_SERIALIZE) ||
@@ -1695,8 +1697,8 @@ void ide_port_scan(ide_hwif_t *hwif)
        hwif->present = 1;
 
        ide_port_tune_devices(hwif);
-       ide_acpi_port_init_devices(hwif);
        ide_port_setup_devices(hwif);
+       ide_acpi_port_init_devices(hwif);
        hwif_register_devices(hwif);
        ide_proc_port_register_devices(hwif);
 }