--- ide-features.c.orig Fri Feb 9 19:40:02 2001 +++ ide-features.c Fri May 3 20:21:58 2002 @@ -281,12 +281,18 @@ */ int ide_config_drive_speed (ide_drive_t *drive, byte speed) { + ide_hwgroup_t *hwgroup = HWGROUP(drive); ide_hwif_t *hwif = HWIF(drive); int i, error = 1; - byte stat; + byte stat,unit; + + if (hwgroup->busy) { + printk("Argh: hwgroup is busy in ide_config_drive_speed\n"); + return error; + } #if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI) - byte unit = (drive->select.b.unit & 0x01); + unit = (drive->select.b.unit & 0x01); outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2); #endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */