summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ata/ata-queue.c')
-rw-r--r--sys/dev/ata/ata-queue.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index c048778..a3b1c4e 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -511,11 +511,18 @@ ata_timeout(struct ata_request *request)
*/
if (ch->state == ATA_ACTIVE) {
request->flags |= ATA_R_TIMEOUT;
- mtx_unlock(&ch->state_mtx);
- ATA_LOCKING(ch->dev, ATA_LF_UNLOCK);
if (ch->dma.unload)
ch->dma.unload(request);
+#ifdef ATA_CAM
+ ch->running = NULL;
+ ch->state = ATA_IDLE;
+ ata_cam_end_transaction(ch->dev, request);
+#endif
+ mtx_unlock(&ch->state_mtx);
+ ATA_LOCKING(ch->dev, ATA_LF_UNLOCK);
+#ifndef ATA_CAM
ata_finish(request);
+#endif
}
else {
mtx_unlock(&ch->state_mtx);
OpenPOWER on IntegriCloud