summaryrefslogtreecommitdiff
path: root/tests/ahci-test.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-02-05 12:41:14 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2015-02-16 15:07:16 +0000
commitc7f9c570b908a844aee393d93d01c332aea2a5a5 (patch)
tree8186bb46eca98961178e34dfe7c1a24a81274747 /tests/ahci-test.c
parente83fd96bfab90298beaa8c8a31e48a905564180e (diff)
downloadqemu-c7f9c570b908a844aee393d93d01c332aea2a5a5.tar.gz
qtest/ahci: rename 'Command' to 'CommandHeader'
The structure name is a bit of a misnomer; the structure currently named command is actually the commandheader. A future patch in this series will add an actual "Command" structure, so we'll rename it now before the rest of the functions in this series try to use it. In addition, rename the "b1" and "b2" fields to be a unified uint16_t named "flags." Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1423158090-25580-4-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/ahci-test.c')
-rw-r--r--tests/ahci-test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index 90647f2a0c..d420e5f8be 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -660,7 +660,7 @@ static void ahci_test_identify(AHCIQState *ahci)
RegD2HFIS *d2h = g_malloc0(0x20);
RegD2HFIS *pio = g_malloc0(0x20);
RegH2DFIS fis;
- AHCICommand cmd;
+ AHCICommandHeader cmd;
PRD prd;
uint32_t reg, table, data_ptr;
uint16_t buff[256];
@@ -703,9 +703,9 @@ static void ahci_test_identify(AHCIQState *ahci)
/* Copy the existing Command #0 structure from the CLB into local memory,
* and build a new command #0. */
memread(ahci->port[i].clb, &cmd, sizeof(cmd));
- cmd.b1 = 5; /* reg_h2d_fis is 5 double-words long */
- cmd.b2 = 0x04; /* clear PxTFD.STS.BSY when done */
- cmd.prdtl = cpu_to_le16(1); /* One PRD table entry. */
+ cmd.flags = cpu_to_le16(5); /* reg_h2d_fis is 5 double-words long */
+ cmd.flags |= cpu_to_le16(0x400); /* clear PxTFD.STS.BSY when done */
+ cmd.prdtl = cpu_to_le16(1); /* One PRD table entry. */
cmd.prdbc = 0;
cmd.ctba = cpu_to_le32(table);
cmd.ctbau = 0;