Mark ATA channel as idle on timeout in non-ATA_CAM mode.

This should fix possible duplicate request completion.

Submitted by:	mjacob
This commit is contained in:
Alexander Motin 2010-04-26 11:58:15 +00:00
parent cd4d97b439
commit 22b9488310

View File

@ -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);