diff options
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 512452b379bd..13e26642dad7 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -541,7 +541,8 @@ static int | |||
541 | pmac_ide_do_setfeature(ide_drive_t *drive, u8 command) | 541 | pmac_ide_do_setfeature(ide_drive_t *drive, u8 command) |
542 | { | 542 | { |
543 | ide_hwif_t *hwif = HWIF(drive); | 543 | ide_hwif_t *hwif = HWIF(drive); |
544 | int result = 1; | 544 | int result; |
545 | u8 stat; | ||
545 | 546 | ||
546 | disable_irq_nosync(hwif->irq); | 547 | disable_irq_nosync(hwif->irq); |
547 | udelay(1); | 548 | udelay(1); |
@@ -552,9 +553,9 @@ pmac_ide_do_setfeature(ide_drive_t *drive, u8 command) | |||
552 | hwif->OUTB(command, IDE_NSECTOR_REG); | 553 | hwif->OUTB(command, IDE_NSECTOR_REG); |
553 | hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG); | 554 | hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG); |
554 | hwif->OUTBSYNC(drive, WIN_SETFEATURES, IDE_COMMAND_REG); | 555 | hwif->OUTBSYNC(drive, WIN_SETFEATURES, IDE_COMMAND_REG); |
555 | udelay(1); | 556 | result = __ide_wait_stat(drive, drive->ready_stat, |
556 | /* Timeout bumped for some powerbooks */ | 557 | BUSY_STAT|DRQ_STAT|ERR_STAT, |
557 | result = wait_for_ready(drive, 2000); | 558 | WAIT_CMD, &stat); |
558 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); | 559 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); |
559 | if (result) | 560 | if (result) |
560 | printk(KERN_ERR "%s: pmac_ide_do_setfeature disk not ready " | 561 | printk(KERN_ERR "%s: pmac_ide_do_setfeature disk not ready " |