--- ata-lowlevel.c.orig Mon Sep 1 20:13:21 2003 +++ ata-lowlevel.c Tue Sep 2 00:15:20 2003 @@ -591,7 +591,7 @@ if (!mask) return; - if (mask & 0x01 && ostat0 != 0x00 && + if (mask & 0x01 && stat0 != 0x00 && !(ch->devices & (ATA_ATA_MASTER | ATA_ATAPI_MASTER))) { ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); DELAY(10); @@ -604,7 +604,7 @@ if (err != 0x58 && lsb == 0xa5) ch->devices |= ATA_ATA_MASTER; } - if (mask & 0x02 && ostat1 != 0x00 && + if (mask & 0x02 && stat1 != 0x00 && !(ch->devices & (ATA_ATA_SLAVE | ATA_ATAPI_SLAVE))) { ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_SLAVE); DELAY(10);