diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:23 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:23 -0400 |
commit | c36a7e98846a7a4a1c09b7f148395089bce512d8 (patch) | |
tree | baac89aad46abb36421cd008df880ae1f95a3f6f /drivers/ide/ide-probe.c | |
parent | efa402d59e99b7940501ead18a11b3d6604ad720 (diff) |
ide: fix EXABYTENEST handling in probe_for_drive()
Fix EXABYTENEST handling in probe_for_drive() (so drive->present
is checked for "nested" device) and cleanup enable_nest().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 7578ad48080f..e78cfde5bd6d 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -542,11 +542,6 @@ static void enable_nest (ide_drive_t *drive) | |||
542 | printk(KERN_CONT "failed (status = 0x%02x)\n", stat); | 542 | printk(KERN_CONT "failed (status = 0x%02x)\n", stat); |
543 | else | 543 | else |
544 | printk(KERN_CONT "success\n"); | 544 | printk(KERN_CONT "success\n"); |
545 | |||
546 | /* if !(success||timed-out) */ | ||
547 | if (do_probe(drive, ATA_CMD_ID_ATA) >= 2) | ||
548 | /* look for ATAPI device */ | ||
549 | (void)do_probe(drive, ATA_CMD_ID_ATAPI); | ||
550 | } | 545 | } |
551 | 546 | ||
552 | /** | 547 | /** |
@@ -586,19 +581,22 @@ static inline u8 probe_for_drive (ide_drive_t *drive) | |||
586 | strcpy(m, "UNKNOWN"); | 581 | strcpy(m, "UNKNOWN"); |
587 | 582 | ||
588 | /* skip probing? */ | 583 | /* skip probing? */ |
589 | if (!drive->noprobe) | 584 | if (!drive->noprobe) { |
590 | { | 585 | retry: |
591 | /* if !(success||timed-out) */ | 586 | /* if !(success||timed-out) */ |
592 | if (do_probe(drive, ATA_CMD_ID_ATA) >= 2) | 587 | if (do_probe(drive, ATA_CMD_ID_ATA) >= 2) |
593 | /* look for ATAPI device */ | 588 | /* look for ATAPI device */ |
594 | (void)do_probe(drive, ATA_CMD_ID_ATAPI); | 589 | (void)do_probe(drive, ATA_CMD_ID_ATAPI); |
590 | |||
595 | if (!drive->present) | 591 | if (!drive->present) |
596 | /* drive not found */ | 592 | /* drive not found */ |
597 | return 0; | 593 | return 0; |
598 | 594 | ||
599 | if (strstr(m, "E X A B Y T E N E S T")) | 595 | if (strstr(m, "E X A B Y T E N E S T")) { |
600 | enable_nest(drive); | 596 | enable_nest(drive); |
601 | 597 | goto retry; | |
598 | } | ||
599 | |||
602 | /* identification failed? */ | 600 | /* identification failed? */ |
603 | if (!drive->id_read) { | 601 | if (!drive->id_read) { |
604 | if (drive->media == ide_disk) { | 602 | if (drive->media == ide_disk) { |