Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[deliverable/linux.git] / drivers / ide / ide-probe.c
index 5a4c5ea12f896e1aea012232ef739ea983336116..d1011712601c9a01913d143200c615d713d4bae2 100644 (file)
@@ -719,9 +719,9 @@ EXPORT_SYMBOL_GPL(ide_undecoded_slave);
  */
 static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
 {
-       unsigned int unit;
        unsigned long flags;
        unsigned int irqd;
+       int unit;
 
        if (hwif->noprobe)
                return;
@@ -777,10 +777,9 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
                printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name);
 
        /*
-        * Second drive should only exist if first drive was found,
-        * but a lot of cdrom drives are configured as single slaves.
+        * Need to probe slave device first to make it release PDIAG-.
         */
-       for (unit = 0; unit < MAX_DRIVES; ++unit) {
+       for (unit = MAX_DRIVES - 1; unit >= 0; unit--) {
                ide_drive_t *drive = &hwif->drives[unit];
                drive->dn = (hwif->channel ? 2 : 0) + unit;
                (void) probe_for_drive(drive);
@@ -827,10 +826,8 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
                ide_drive_t *drive = &hwif->drives[unit];
 
                if (drive->present) {
-                       if (hwif->tuneproc != NULL && 
-                               drive->autotune == IDE_TUNE_AUTO)
-                               /* auto-tune PIO mode */
-                               hwif->tuneproc(drive, 255);
+                       if (drive->autotune == IDE_TUNE_AUTO)
+                               ide_set_max_pio(drive);
 
                        if (drive->autotune != IDE_TUNE_DEFAULT &&
                            drive->autotune != IDE_TUNE_AUTO)
@@ -945,7 +942,7 @@ static void save_match(ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match)
  */
 static int ide_init_queue(ide_drive_t *drive)
 {
-       request_queue_t *q;
+       struct request_queue *q;
        ide_hwif_t *hwif = HWIF(drive);
        int max_sectors = 256;
        int max_sg_entries = PRD_ENTRIES;
This page took 0.037292 seconds and 5 git commands to generate.