summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-lowlevel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c
index 740f5b7..ab8a142 100644
--- a/sys/dev/ata/ata-lowlevel.c
+++ b/sys/dev/ata/ata-lowlevel.c
@@ -645,10 +645,6 @@ ata_reset(struct ata_channel *ch)
DELAY(100000);
}
- /* enable interrupt */
- DELAY(10);
- ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_4BIT);
-
if (stat0 & ATA_S_BUSY)
mask &= ~0x01;
if (stat1 & ATA_S_BUSY)
@@ -733,6 +729,9 @@ ata_command(struct ata_device *atadev, u_int8_t command,
return -1;
}
+ /* enable interrupt */
+ ATA_IDX_OUTB(atadev->channel, ATA_ALTSTAT, ATA_A_4BIT);
+
/* only use 48bit addressing if needed (avoid bugs and overhead) */
if ((lba > 268435455 || count > 256) && atadev->param &&
atadev->param->support.command2 & ATA_SUPPORT_ADDRESS48) {
OpenPOWER on IntegriCloud