diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-11 00:39:23 +0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-11 00:39:23 +0400 |
commit | c36a7e98846a7a4a1c09b7f148395089bce512d8 (patch) | |
tree | baac89aad46abb36421cd008df880ae1f95a3f6f /drivers/ide/ide-probe.c | |
parent | efa402d59e99b7940501ead18a11b3d6604ad720 (diff) | |
download | linux-c36a7e98846a7a4a1c09b7f148395089bce512d8.tar.xz |
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) printk(KERN_CONT "failed (status = 0x%02x)\n", stat); else printk(KERN_CONT "success\n"); - - /* if !(success||timed-out) */ - if (do_probe(drive, ATA_CMD_ID_ATA) >= 2) - /* look for ATAPI device */ - (void)do_probe(drive, ATA_CMD_ID_ATAPI); } /** @@ -586,19 +581,22 @@ static inline u8 probe_for_drive (ide_drive_t *drive) strcpy(m, "UNKNOWN"); /* skip probing? */ - if (!drive->noprobe) - { + if (!drive->noprobe) { +retry: /* if !(success||timed-out) */ if (do_probe(drive, ATA_CMD_ID_ATA) >= 2) /* look for ATAPI device */ (void)do_probe(drive, ATA_CMD_ID_ATAPI); + if (!drive->present) /* drive not found */ return 0; - if (strstr(m, "E X A B Y T E N E S T")) + if (strstr(m, "E X A B Y T E N E S T")) { enable_nest(drive); - + goto retry; + } + /* identification failed? */ if (!drive->id_read) { if (drive->media == ide_disk) { |