summaryrefslogtreecommitdiff
path: root/src/VBox/Devices/Storage/DevATA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Devices/Storage/DevATA.cpp')
-rw-r--r--src/VBox/Devices/Storage/DevATA.cpp45
1 files changed, 22 insertions, 23 deletions
diff --git a/src/VBox/Devices/Storage/DevATA.cpp b/src/VBox/Devices/Storage/DevATA.cpp
index 08bef420f..12f1d8b9c 100644
--- a/src/VBox/Devices/Storage/DevATA.cpp
+++ b/src/VBox/Devices/Storage/DevATA.cpp
@@ -1,4 +1,4 @@
-/* $Id: DevATA.cpp 35595 2011-01-17 20:05:15Z vboxsync $ */
+/* $Id: DevATA.cpp $ */
/** @file
* VBox storage devices: ATA/ATAPI controller device (disk and cdrom).
*/
@@ -4996,29 +4996,28 @@ static DECLCALLBACK(int) ataAsyncIOLoop(RTTHREAD ThreadSelf, void *pvUser)
break;
case ATA_AIO_ABORT:
- /* Abort the current command only if it operates on the same interface. */
- if (pCtl->iAIOIf == pReq->u.a.iIf)
- {
- s = &pCtl->aIfs[pCtl->iAIOIf];
+ /* Abort the current command no matter what. There cannot be
+ * any command activity on the other drive otherwise using
+ * one thread per controller wouldn't work at all. */
+ s = &pCtl->aIfs[pReq->u.a.iIf];
- pCtl->uAsyncIOState = ATA_AIO_NEW;
- /* Do not change the DMA registers, they are not affected by the
- * ATA controller reset logic. It should be sufficient to issue a
- * new command, which is now possible as the state is cleared. */
- if (pReq->u.a.fResetDrive)
- {
- ataResetDevice(s);
- ataExecuteDeviceDiagnosticSS(s);
- }
- else
- {
- /* Stop any pending DMA transfer. */
- s->fDMA = false;
- ataPIOTransferStop(s);
- ataUnsetStatus(s, ATA_STAT_BUSY | ATA_STAT_DRQ | ATA_STAT_SEEK | ATA_STAT_ERR);
- ataSetStatus(s, ATA_STAT_READY);
- ataSetIRQ(s);
- }
+ pCtl->uAsyncIOState = ATA_AIO_NEW;
+ /* Do not change the DMA registers, they are not affected by the
+ * ATA controller reset logic. It should be sufficient to issue a
+ * new command, which is now possible as the state is cleared. */
+ if (pReq->u.a.fResetDrive)
+ {
+ ataResetDevice(s);
+ ataExecuteDeviceDiagnosticSS(s);
+ }
+ else
+ {
+ /* Stop any pending DMA transfer. */
+ s->fDMA = false;
+ ataPIOTransferStop(s);
+ ataUnsetStatus(s, ATA_STAT_BUSY | ATA_STAT_DRQ | ATA_STAT_SEEK | ATA_STAT_ERR);
+ ataSetStatus(s, ATA_STAT_READY);
+ ataSetIRQ(s);
}
break;