summaryrefslogtreecommitdiffstats
path: root/tests/libqos/ahci.h
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-02-25 18:06:37 -0500
committerKevin Wolf <kwolf@redhat.com>2015-03-10 14:02:23 +0100
commitf9f963e0fbba98d7ece75287c40d0c1b249dc9b4 (patch)
treeaf2c70792a5d37d38bc03b513022ee8922dcd2b3 /tests/libqos/ahci.h
parentd63b4017c2dff9cf0f15d06d5f604a97a30ef4c5 (diff)
downloadhqemu-f9f963e0fbba98d7ece75287c40d0c1b249dc9b4.zip
hqemu-f9f963e0fbba98d7ece75287c40d0c1b249dc9b4.tar.gz
libqos/ahci: add ahci command helpers
ahci_command_set_flags: Set additional flags in the command header. ahci_command_clr_flags: Clear flags from the command header. ahci_command_set_offset: Change the IO sector from 0. ahci_command_adjust: Adjust many values simultaneously. To be used to adjust the command header if the default values/guesses were incorrect or undesirable. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1424905602-24715-4-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> [ kwolf: Fixed conflicting prototype for ahci_command_adjust() ] Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/libqos/ahci.h')
-rw-r--r--tests/libqos/ahci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/libqos/ahci.h b/tests/libqos/ahci.h
index 39b99d3..888545d 100644
--- a/tests/libqos/ahci.h
+++ b/tests/libqos/ahci.h
@@ -537,11 +537,16 @@ void ahci_command_verify(AHCIQState *ahci, AHCICommand *cmd);
void ahci_command_free(AHCICommand *cmd);
/* Command adjustments */
+void ahci_command_set_flags(AHCICommand *cmd, uint16_t cmdh_flags);
+void ahci_command_clr_flags(AHCICommand *cmd, uint16_t cmdh_flags);
+void ahci_command_set_offset(AHCICommand *cmd, uint64_t lba_sect);
void ahci_command_set_buffer(AHCICommand *cmd, uint64_t buffer);
void ahci_command_set_size(AHCICommand *cmd, uint64_t xbytes);
void ahci_command_set_prd_size(AHCICommand *cmd, unsigned prd_size);
void ahci_command_set_sizes(AHCICommand *cmd, uint64_t xbytes,
unsigned prd_size);
+void ahci_command_adjust(AHCICommand *cmd, uint64_t lba_sect, uint64_t gbuffer,
+ uint64_t xbytes, unsigned prd_size);
/* Command Misc */
uint8_t ahci_command_slot(AHCICommand *cmd);
OpenPOWER on IntegriCloud