Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[safe/jmp/linux-2.6] / drivers / ide / ide-probe.c
index 1ec8b31..4c3d1bf 100644 (file)
@@ -695,14 +695,8 @@ static int ide_probe_port(ide_hwif_t *hwif)
        if (irqd)
                disable_irq(hwif->irq);
 
-       rc = ide_port_wait_ready(hwif);
-       if (rc == -ENODEV) {
-               printk(KERN_INFO "%s: no devices on the port\n", hwif->name);
-               goto out;
-       } else if (rc == -EBUSY)
-               printk(KERN_ERR "%s: not ready before the probe\n", hwif->name);
-       else
-               rc = -ENODEV;
+       if (ide_port_wait_ready(hwif) == -EBUSY)
+               printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name);
 
        /*
         * Second drive should only exist if first drive was found,
@@ -713,7 +707,7 @@ static int ide_probe_port(ide_hwif_t *hwif)
                if (drive->dev_flags & IDE_DFLAG_PRESENT)
                        rc = 0;
        }
-out:
+
        /*
         * Use cached IRQ number. It might be (and is...) changed by probe
         * code above
@@ -790,8 +784,7 @@ static int ide_init_queue(ide_drive_t *drive)
                max_sg_entries >>= 1;
 #endif /* CONFIG_PCI */
 
-       blk_queue_max_hw_segments(q, max_sg_entries);
-       blk_queue_max_phys_segments(q, max_sg_entries);
+       blk_queue_max_segments(q, max_sg_entries);
 
        /* assign drive queue */
        drive->queue = q;
@@ -1043,6 +1036,8 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
                if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
                        drive->dev_flags |= IDE_DFLAG_NO_UNMASK;
 
+               drive->pio_mode = XFER_PIO_0;
+
                if (port_ops && port_ops->init_dev)
                        port_ops->init_dev(drive);
        }