[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 13/16] libqos/ahci: set the NCQ tag on command_co
From: |
John Snow |
Subject: |
[Qemu-block] [PATCH v2 13/16] libqos/ahci: set the NCQ tag on command_commit |
Date: |
Mon, 22 Jun 2015 19:38:25 -0400 |
NCQ commands have the concept of a "TAG" that they need to set,
but in the AHCI world, it is mandated that the TAG always match
the command slot that you executed the NCQ from.
See AHCI 9.3.1.1.5.2 "Native Queued Commands".
Signed-off-by: John Snow <address@hidden>
---
tests/libqos/ahci.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c
index 953a320..7cf667a 100644
--- a/tests/libqos/ahci.c
+++ b/tests/libqos/ahci.c
@@ -857,6 +857,11 @@ void ahci_command_commit(AHCIQState *ahci, AHCICommand
*cmd, uint8_t port)
cmd->port = port;
cmd->slot = ahci_pick_cmd(ahci, port);
+ if (cmd->props->ncq) {
+ NCQFIS *nfis = (NCQFIS *)&cmd->fis;
+ nfis->tag = (cmd->slot << 3) & 0xFC;
+ }
+
/* Create a buffer for the command table */
prdtl = size_to_prdtl(cmd->xbytes, cmd->prd_size);
table_size = CMD_TBL_SIZ(prdtl);
--
2.1.0
- [Qemu-block] [PATCH v2 05/16] ahci: separate prdtl from opts, (continued)
- [Qemu-block] [PATCH v2 05/16] ahci: separate prdtl from opts, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 06/16] ahci: add ncq debug checks, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 07/16] ahci: ncq sector count correction, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 08/16] ahci/qtest: Execute IDENTIFY prior to data commands, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 09/16] libqos/ahci: fix cmd_sanity for ncq, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 11/16] libqos/ahci: edit wait to be ncq aware, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 10/16] libqos/ahci: add NCQ frame support, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 14/16] libqos/ahci: Force all NCQ commands to be LBA48, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 12/16] libqos/ahci: adjust expected NCQ interrupts, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 16/16] qtest/ahci: ncq migration test, John Snow, 2015/06/22
- [Qemu-block] [PATCH v2 13/16] libqos/ahci: set the NCQ tag on command_commit,
John Snow <=
- [Qemu-block] [PATCH v2 15/16] qtest/ahci: simple ncq data test, John Snow, 2015/06/22
- Re: [Qemu-block] [PATCH v2 00/16] ahci: ncq cleanup, part 1, Stefan Hajnoczi, 2015/06/26