Small change to the previous commit, zero out the 48BIT flag in ata_command

instead of in dmadone.
This commit is contained in:
sos 2003-01-19 20:18:07 +00:00
parent 31d113863a
commit 9a5444fa22
2 changed files with 10 additions and 10 deletions

View File

@ -1119,6 +1119,7 @@ ata_command(struct ata_device *atadev, u_int8_t command,
else
ATA_OUTB(atadev->channel->r_io, ATA_DRIVE,
ATA_D_IBM | ATA_D_LBA | atadev->unit | ((lba>>24) &0xf));
atadev->channel->flags &= ~ATA_48BIT_ACTIVE;
}
switch (flags & ATA_WAIT_MASK) {

View File

@ -1534,11 +1534,11 @@ ata_dmastart(struct ata_device *atadev, caddr_t data, int32_t count, int dir)
case 0x0d30105a: /* Promise OEM ATA 100 */
case 0x4d30105a: /* Promise Ultra/Fasttrak 100 */
if (ch->flags & ATA_48BIT_ACTIVE) {
ATA_OUTB(ch->r_bmio, (ch->unit ? 0x09 : 0x11),
ATA_INB(ch->r_bmio, (ch->unit ? 0x09 : 0x11)) |
(ch->unit ? 0x08 : 0x02));
ATA_OUTL(ch->r_bmio, (ch->unit ? 0x1c : 0x20),
(dir ? 0x05000000 : 0x06000000) | (count >> 1));
ATA_OUTB(ch->r_bmio, (ch->unit ? 0x09 : 0x11),
ATA_INB(ch->r_bmio, (ch->unit ? 0x09 : 0x11)) |
(ch->unit ? 0x08 : 0x02));
ATA_OUTL(ch->r_bmio, (ch->unit ? 0x1c : 0x20),
(dir ? 0x05000000 : 0x06000000) | (count >> 1));
}
}
@ -1578,11 +1578,10 @@ ata_dmadone(struct ata_device *atadev)
case 0x0d30105a: /* Promise OEM ATA 100 */
case 0x4d30105a: /* Promise Ultra/Fasttrak 100 */
if (ch->flags & ATA_48BIT_ACTIVE) {
ATA_OUTB(ch->r_bmio, (ch->unit ? 0x09 : 0x11),
ATA_INB(ch->r_bmio, (ch->unit ? 0x09 : 0x11)) &
~(ch->unit ? 0x08 : 0x02));
ATA_OUTL(ch->r_bmio, (ch->unit ? 0x1c : 0x20), 0);
ch->flags &= ~ATA_48BIT_ACTIVE;
ATA_OUTB(ch->r_bmio, (ch->unit ? 0x09 : 0x11),
ATA_INB(ch->r_bmio, (ch->unit ? 0x09 : 0x11)) &
~(ch->unit ? 0x08 : 0x02));
ATA_OUTL(ch->r_bmio, (ch->unit ? 0x1c : 0x20), 0);
}
}