--- linux/drivers/ide/ide.c-orig Tue Jan 8 15:46:19 2002 +++ linux/drivers/ide/ide.c Tue Jan 8 15:46:40 2002 @@ -1527,6 +1527,7 @@ { ide_drive_t *drive; ide_hwif_t *hwif; + struct request *rq; ide_startstop_t startstop; ide_get_lock(&ide_lock, ide_intr, hwgroup); /* for atari only: POSSIBLY BROKEN HERE(?) */ --- linux/drivers/ide/ide-pmac.c-orig Sun Jan 27 17:40:07 2002 +++ linux/drivers/ide/ide-pmac.c Sun Jan 27 17:35:40 2002 @@ -338,41 +338,6 @@ } -/* Note: We don't use the generic routine here because for some - * yet unexplained reasons, it cause some media-bay CD-ROMs to - * lockup the bus. Strangely, this new version of the code is - * almost identical to the generic one and works, I've not yet - * managed to figure out what bit is causing the lockup in the - * generic code, possibly a timing issue... - * - * --BenH - */ -static int __pmac -wait_for_ready(ide_drive_t *drive) -{ - /* Timeout bumped for some powerbooks */ - int timeout = 2000; - byte stat; - - while(--timeout) { - stat = GET_STAT(); - if(!(stat & BUSY_STAT)) { - if (drive->ready_stat == 0) - break; - else if((stat & drive->ready_stat) || (stat & ERR_STAT)) - break; - } - mdelay(1); - } - if((stat & ERR_STAT) || timeout <= 0) { - if (stat & ERR_STAT) { - printk(KERN_ERR "ide_pmac: wait_for_ready, error status: %x\n", stat); - } - return 1; - } - return 0; -} - static int __pmac pmac_ide_do_setfeature(ide_drive_t *drive, byte command) { @@ -386,7 +351,8 @@ SELECT_MASK(HWIF(drive), drive, 0); udelay(1); (void)GET_STAT(); /* Get rid of pending error state */ - if(wait_for_ready(drive)) { + /* Timeout bumped for some powerbooks */ + if(wait_for_ready(drive, 2000)) { printk(KERN_ERR "pmac_ide_do_setfeature disk not ready before SET_FEATURE!\n"); goto out; } @@ -398,7 +364,8 @@ udelay(1); __save_flags(flags); /* local CPU only */ ide__sti(); /* local CPU only -- for jiffies */ - result = wait_for_ready(drive); + /* Timeout bumped for some powerbooks */ + result = wait_for_ready(drive, 2000); __restore_flags(flags); /* local CPU only */ OUT_BYTE(drive->ctl, IDE_CONTROL_REG); if (result)