diff -urN wt2-5f/drivers/ide/ide-floppy.c wt2/drivers/ide/ide-floppy.c --- wt2-5f/drivers/ide/ide-floppy.c Sun Mar 3 20:10:09 2002 +++ wt2/drivers/ide/ide-floppy.c Sun Mar 3 20:15:25 2002 @@ -71,6 +71,11 @@ * including set_bit patch from Rusty Russel * Ver 0.97 Jul 22 01 Merge 0.91-0.96 onto 0.9.sv for ac series * Ver 0.97.sv Aug 3 01 Backported from 2.4.7-ac3 + * Ver 0.98 Oct 26 01 Split idefloppy_transfer_pc into two pieces to + * fix a lost interrupt problem. It appears the busy + * bit was being deasserted by my IOMEGA ATAPI ZIP 100 + * drive before the drive was actually ready. + * Ver 0.98a Oct 29 01 Expose delay value so we can play. * Ver 0.99 Feb 24 02 Remove duplicate code, modify clik! detection code to support new PocketZip drives */ @@ -2027,20 +2032,12 @@ if (strcmp(drive->id->model, "IOMEGA ZIP 100 ATAPI") == 0) { + set_bit(IDEFLOPPY_ZIP_DRIVE, &floppy->flags); + /* This value will be visible in the /proc/ide/hdx/settings */ + floppy->ticks = IDEFLOPPY_TICKS_DELAY; for (i = 0; i < 1 << PARTN_BITS; i++) max_sectors[major][minor + i] = 64; } - /* - * Guess what? The IOMEGA Clik! drive also needs the - * above fix. It makes nasty clicking noises without - * it, so please don't remove this. - */ - if (strncmp(drive->id->model, "IOMEGA Clik", 11) == 0) - { - for (i = 0; i < 1 << PARTN_BITS; i++) - max_sectors[major][minor + i] = 64; - set_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags); - } (void) idefloppy_get_capacity (drive); idefloppy_add_settings(drive); diff -urN wt2-5f/drivers/ide/ide-pmac.c wt2/drivers/ide/ide-pmac.c --- wt2-5f/drivers/ide/ide-pmac.c Sun Mar 3 20:10:09 2002 +++ wt2/drivers/ide/ide-pmac.c Sun Mar 3 20:12:19 2002 @@ -352,41 +352,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) { @@ -400,7 +365,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; } @@ -412,7 +378,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) diff -urN wt2-5f/drivers/ide/ide.c wt2/drivers/ide/ide.c --- wt2-5f/drivers/ide/ide.c Sun Mar 3 20:10:09 2002 +++ wt2/drivers/ide/ide.c Sun Mar 3 20:12:19 2002 @@ -1349,6 +1349,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(?) */