[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/35] ahci/qtest: Execute IDENTIFY prior to data com
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 12/35] ahci/qtest: Execute IDENTIFY prior to data commands |
Date: |
Sat, 4 Jul 2015 02:06:51 -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>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: 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] [PULL 05/35] ahci: Rename NCQFIS structure fields, (continued)
- [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, 2015/07/04
- [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 <=
- [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
- [Qemu-devel] [PULL 18/35] libqos/ahci: Force all NCQ commands to be LBA48, John Snow, 2015/07/04
- [Qemu-devel] [PULL 19/35] qtest/ahci: simple ncq data test, John Snow, 2015/07/04
- [Qemu-devel] [PULL 20/35] qtest/ahci: ncq migration test, John Snow, 2015/07/04
- [Qemu-devel] [PULL 22/35] ahci: stash ncq command, John Snow, 2015/07/04
- [Qemu-devel] [PULL 23/35] ahci: assert is_ncq for process_ncq, John Snow, 2015/07/04