From 22b94883101e91c954afcaddecea718a64ac7dda Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Mon, 26 Apr 2010 11:58:15 +0000 Subject: [PATCH] Mark ATA channel as idle on timeout in non-ATA_CAM mode. This should fix possible duplicate request completion. Submitted by: mjacob --- sys/dev/ata/ata-queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c index a3b1c4e4435c..4aef47190cbd 100644 --- a/sys/dev/ata/ata-queue.c +++ b/sys/dev/ata/ata-queue.c @@ -513,9 +513,9 @@ ata_timeout(struct ata_request *request) request->flags |= ATA_R_TIMEOUT; if (ch->dma.unload) ch->dma.unload(request); -#ifdef ATA_CAM ch->running = NULL; ch->state = ATA_IDLE; +#ifdef ATA_CAM ata_cam_end_transaction(ch->dev, request); #endif mtx_unlock(&ch->state_mtx);