]> err.no Git - linux-2.6/commitdiff
ide-pmac: remove extra good status wait from pmac_ide_do_setfeature()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 13 Oct 2007 15:47:49 +0000 (17:47 +0200)
Don't check for good device status before executing the command in
pmac_ide_do_setfeature() (ide_config_drive_speed() doesn't do this).

It is a job of upper layers to guarantee that the device is ready to
accept new command before we get here.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ppc/pmac.c

index ad58c7ecf8587d84f90b3e81ef202650b5a8b24c..512452b379bd0a7278266c52bd3bb2442647a89d 100644 (file)
@@ -548,16 +548,6 @@ pmac_ide_do_setfeature(ide_drive_t *drive, u8 command)
        SELECT_DRIVE(drive);
        SELECT_MASK(drive, 0);
        udelay(1);
-       /* Get rid of pending error state */
-       (void) hwif->INB(IDE_STATUS_REG);
-       /* Timeout bumped for some powerbooks */
-       if (wait_for_ready(drive, 2000)) {
-               /* Timeout bumped for some powerbooks */
-               printk(KERN_ERR "%s: pmac_ide_do_setfeature disk not ready "
-                       "before SET_FEATURE!\n", drive->name);
-               goto out;
-       }
-       udelay(10);
        hwif->OUTB(drive->ctl | 2, IDE_CONTROL_REG);
        hwif->OUTB(command, IDE_NSECTOR_REG);
        hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG);
@@ -569,7 +559,7 @@ pmac_ide_do_setfeature(ide_drive_t *drive, u8 command)
        if (result)
                printk(KERN_ERR "%s: pmac_ide_do_setfeature disk not ready "
                        "after SET_FEATURE !\n", drive->name);
-out:
+
        SELECT_MASK(drive, 0);
        if (result == 0) {
                drive->id->dma_ultra &= ~0xFF00;