[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 08/16] ahci/qtest: Execute IDENTIFY prior to data
From: |
John Snow |
Subject: |
[Qemu-devel] [PATCH v2 08/16] ahci/qtest: Execute IDENTIFY prior to data commands |
Date: |
Mon, 22 Jun 2015 19:38:20 -0400 |
If you try to execute an NCQ command before trying to engage with the
device by issuing an IDENTIFY command, the error bits that are part of
the signature will fool the test suite into thinking there was a failure.
Issue IDENTIFY first on "boot", which will clear the signature out of
the registers for us.
Signed-off-by: John Snow <address@hidden>
---
tests/ahci-test.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index 0a0ef2a..ee1dc20 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -228,6 +228,8 @@ static AHCIQState *ahci_boot_and_enable(const char *cli,
...)
{
AHCIQState *ahci;
va_list ap;
+ uint16_t buff[256];
+ uint8_t port;
if (cli) {
va_start(ap, cli);
@@ -239,6 +241,10 @@ static AHCIQState *ahci_boot_and_enable(const char *cli,
...)
ahci_pci_enable(ahci);
ahci_hba_enable(ahci);
+ /* Initialize test device */
+ port = ahci_port_select(ahci);
+ ahci_port_clear(ahci, port);
+ ahci_io(ahci, port, CMD_IDENTIFY, &buff, sizeof(buff), 0);
return ahci;
}
--
2.1.0
- [Qemu-devel] [PATCH v2 00/16] ahci: ncq cleanup, part 1, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 01/16] ahci: Rename NCQFIS structure fields, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 03/16] ahci: add ncq_err helper, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 04/16] ahci: check for ncq prdtl overflow, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 02/16] ahci: use shorter variables, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 06/16] ahci: add ncq debug checks, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 05/16] ahci: separate prdtl from opts, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 07/16] ahci: ncq sector count correction, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 08/16] ahci/qtest: Execute IDENTIFY prior to data commands,
John Snow <=
- [Qemu-devel] [PATCH v2 09/16] libqos/ahci: fix cmd_sanity for ncq, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 10/16] libqos/ahci: add NCQ frame support, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 11/16] libqos/ahci: edit wait to be ncq aware, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 12/16] libqos/ahci: adjust expected NCQ interrupts, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 14/16] libqos/ahci: Force all NCQ commands to be LBA48, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 13/16] libqos/ahci: set the NCQ tag on command_commit, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 16/16] qtest/ahci: ncq migration test, John Snow, 2015/06/22
- [Qemu-devel] [PATCH v2 15/16] qtest/ahci: simple ncq data test, John Snow, 2015/06/22
- Re: [Qemu-devel] [PATCH v2 00/16] ahci: ncq cleanup, part 1, Stefan Hajnoczi, 2015/06/26