[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/35] ahci: add ncq_err helper
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 07/35] ahci: add ncq_err helper |
Date: |
Sat, 4 Jul 2015 02:06:46 -0400 |
Set some appropriate error bits for NCQ for us.
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
---
hw/ide/ahci.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 3a8bff7..7b286a2 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -922,6 +922,15 @@ out:
return r;
}
+static void ncq_err(NCQTransferState *ncq_tfs)
+{
+ IDEState *ide_state = &ncq_tfs->drive->port.ifs[0];
+
+ ide_state->error = ABRT_ERR;
+ ide_state->status = READY_STAT | ERR_STAT;
+ ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag);
+}
+
static void ncq_cb(void *opaque, int ret)
{
NCQTransferState *ncq_tfs = (NCQTransferState *)opaque;
@@ -934,10 +943,7 @@ static void ncq_cb(void *opaque, int ret)
ncq_tfs->drive->port_regs.scr_act &= ~(1 << ncq_tfs->tag);
if (ret < 0) {
- /* error */
- ide_state->error = ABRT_ERR;
- ide_state->status = READY_STAT | ERR_STAT;
- ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag);
+ ncq_err(ncq_tfs);
} else {
ide_state->status = READY_STAT | SEEK_STAT;
}
--
2.1.0
- [Qemu-devel] [PULL 00/35] Ide patches, John Snow, 2015/07/04
- [Qemu-devel] [PULL 01/35] ahci: Do not ignore memory access read size, John Snow, 2015/07/04
- [Qemu-devel] [PULL 05/35] ahci: Rename NCQFIS structure fields, John Snow, 2015/07/04
- [Qemu-devel] [PULL 02/35] qtest/ahci: add test_max, John Snow, 2015/07/04
- [Qemu-devel] [PULL 06/35] ahci: use shorter variables, John Snow, 2015/07/04
- [Qemu-devel] [PULL 04/35] qtest/ahci: add port_reset test, John Snow, 2015/07/04
- [Qemu-devel] [PULL 03/35] libqos/ahci: fix memory management bugs, John Snow, 2015/07/04
- [Qemu-devel] [PULL 07/35] ahci: add ncq_err helper,
John Snow <=
- [Qemu-devel] [PULL 08/35] ahci: check for ncq prdtl overflow, John Snow, 2015/07/04
- [Qemu-devel] [PULL 09/35] ahci: separate prdtl from opts, John Snow, 2015/07/04
- [Qemu-devel] [PULL 10/35] ahci: add ncq debug checks, John Snow, 2015/07/04
- [Qemu-devel] [PULL 11/35] ahci: ncq sector count correction, John Snow, 2015/07/04
- [Qemu-devel] [PULL 12/35] ahci/qtest: Execute IDENTIFY prior to data commands, John Snow, 2015/07/04
- [Qemu-devel] [PULL 13/35] libqos/ahci: fix cmd_sanity for ncq, John Snow, 2015/07/04
- [Qemu-devel] [PULL 14/35] libqos/ahci: add NCQ frame support, John Snow, 2015/07/04
- [Qemu-devel] [PULL 17/35] libqos/ahci: set the NCQ tag on command_commit, John Snow, 2015/07/04
- [Qemu-devel] [PULL 15/35] libqos/ahci: edit wait to be ncq aware, John Snow, 2015/07/04
- [Qemu-devel] [PULL 16/35] libqos/ahci: adjust expected NCQ interrupts, John Snow, 2015/07/04