diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-13 11:47:51 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-13 11:47:51 -0400 |
commit | b140b99c413ce410197cfcd4014e757cd745226a (patch) | |
tree | 3fc699cbddafe7ef8b6aca284c0e9f2463d34258 /drivers/ide | |
parent | 88b2b32babd46cd54d2de4d17eb869aea3383e11 (diff) |
ide: change master/slave IDENTIFY order
Need to probe slave device first to make it release PDIAG-
(this is required for correct device side cable detection).
Based on libata commit f31f0cc2f0b7527072d94d02da332d9bb8d7d94c.
Thanks to Craig for testing this patch.
Cc: Craig Block <chblock3@yahoo.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-iops.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index f5e73e2950d4..bb691f2eb5bf 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -613,7 +613,6 @@ u8 eighty_ninty_three (ide_drive_t *drive) | |||
613 | 613 | ||
614 | /* | 614 | /* |
615 | * FIXME: | 615 | * FIXME: |
616 | * - change master/slave IDENTIFY order | ||
617 | * - force bit13 (80c cable present) check also for !ivb devices | 616 | * - force bit13 (80c cable present) check also for !ivb devices |
618 | * (unless the slave device is pre-ATA3) | 617 | * (unless the slave device is pre-ATA3) |
619 | */ | 618 | */ |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index b4c9f63a3854..d1011712601c 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -719,9 +719,9 @@ EXPORT_SYMBOL_GPL(ide_undecoded_slave); | |||
719 | */ | 719 | */ |
720 | static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) | 720 | static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) |
721 | { | 721 | { |
722 | unsigned int unit; | ||
723 | unsigned long flags; | 722 | unsigned long flags; |
724 | unsigned int irqd; | 723 | unsigned int irqd; |
724 | int unit; | ||
725 | 725 | ||
726 | if (hwif->noprobe) | 726 | if (hwif->noprobe) |
727 | return; | 727 | return; |
@@ -777,10 +777,9 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) | |||
777 | printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name); | 777 | printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name); |
778 | 778 | ||
779 | /* | 779 | /* |
780 | * Second drive should only exist if first drive was found, | 780 | * Need to probe slave device first to make it release PDIAG-. |
781 | * but a lot of cdrom drives are configured as single slaves. | ||
782 | */ | 781 | */ |
783 | for (unit = 0; unit < MAX_DRIVES; ++unit) { | 782 | for (unit = MAX_DRIVES - 1; unit >= 0; unit--) { |
784 | ide_drive_t *drive = &hwif->drives[unit]; | 783 | ide_drive_t *drive = &hwif->drives[unit]; |
785 | drive->dn = (hwif->channel ? 2 : 0) + unit; | 784 | drive->dn = (hwif->channel ? 2 : 0) + unit; |
786 | (void) probe_for_drive(drive); | 785 | (void) probe_for_drive(drive); |