ide-tape: remove pipeline-specific members from struct ide_tape_obj
[cascardo/linux.git] / drivers / ide / ide-probe.c
index a4b65b3..9b0a3cb 100644 (file)
@@ -472,9 +472,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
                if (stat == (BUSY_STAT | READY_STAT))
                        return 4;
 
-               if ((rc == 1 && cmd == WIN_PIDENTIFY) &&
-                       ((drive->autotune == IDE_TUNE_DEFAULT) ||
-                       (drive->autotune == IDE_TUNE_AUTO))) {
+               if (rc == 1 && cmd == WIN_PIDENTIFY) {
                        printk(KERN_ERR "%s: no response (status = 0x%02x), "
                                        "resetting drive\n", drive->name, stat);
                        msleep(50);
@@ -800,14 +798,9 @@ static int ide_probe_port(ide_hwif_t *hwif)
                if (drive->present)
                        rc = 0;
        }
-       if (hwif->io_ports[IDE_CONTROL_OFFSET] && hwif->reset) {
-               printk(KERN_WARNING "%s: reset\n", hwif->name);
-               hwif->OUTB(12, hwif->io_ports[IDE_CONTROL_OFFSET]);
-               udelay(10);
-               hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
-               (void)ide_busy_sleep(hwif);
-       }
+
        local_irq_restore(flags);
+
        /*
         * Use cached IRQ number. It might be (and is...) changed by probe
         * code above
@@ -834,13 +827,9 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
                ide_drive_t *drive = &hwif->drives[unit];
 
                if (drive->present) {
-                       if (drive->autotune == IDE_TUNE_AUTO)
+                       if (drive->autotune)
                                ide_set_max_pio(drive);
 
-                       if (drive->autotune != IDE_TUNE_DEFAULT &&
-                           drive->autotune != IDE_TUNE_AUTO)
-                               continue;
-
                        drive->nice1 = 1;
 
                        if (hwif->dma_ops)
@@ -1518,13 +1507,20 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
        int i, rc = 0;
 
        for (i = 0; i < MAX_HWIFS; i++) {
-               if (d == NULL || idx[i] == 0xff) {
+               if (idx[i] == 0xff) {
                        mate = NULL;
                        continue;
                }
 
                hwif = &ide_hwifs[idx[i]];
 
+               ide_port_apply_params(hwif);
+
+               if (d == NULL) {
+                       mate = NULL;
+                       continue;
+               }
+
                if (d->chipset != ide_etrax100 && (i & 1) && mate) {
                        hwif->mate = mate;
                        mate->mate = hwif;
@@ -1621,6 +1617,7 @@ EXPORT_SYMBOL_GPL(ide_device_add);
 
 void ide_port_scan(ide_hwif_t *hwif)
 {
+       ide_port_apply_params(hwif);
        ide_port_cable_detect(hwif);
        ide_port_init_devices(hwif);