summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-lowlevel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ata/ata-lowlevel.c')
-rw-r--r--sys/dev/ata/ata-lowlevel.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c
index 0f93deb..eeaf006 100644
--- a/sys/dev/ata/ata-lowlevel.c
+++ b/sys/dev/ata/ata-lowlevel.c
@@ -526,7 +526,8 @@ ata_generic_interrupt(void *data)
break;
}
- /* schedule completition for this request */
+ /* finished running this request schedule completition */
+ ch->running = NULL;
ata_finish(request);
}
@@ -538,6 +539,14 @@ ata_generic_reset(struct ata_channel *ch)
u_int8_t stat0 = 0, stat1 = 0;
int mask = 0, timeout;
+ /* if DMA functionality present stop it */
+ if (ch->dma) {
+ if (ch->dma->stop)
+ ch->dma->stop(ch);
+ if (ch->dma->flags & ATA_DMA_LOADED)
+ ch->dma->unload(ch);
+ }
+
/* reset host end of channel (if supported) */
if (ch->reset)
ch->reset(ch);
OpenPOWER on IntegriCloud