diff options
author | John Snow <jsnow@redhat.com> | 2016-01-11 14:10:43 -0500 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2016-01-11 14:10:43 -0500 |
commit | b682d3a7cf249dc472e3fb76bf49afeaa3eba525 (patch) | |
tree | 05a05424e90c1c0dda0007309278cf1eeaf5cb79 /tests/libqos | |
parent | b1b66c3b5e89ac030e3f724791f57e9c352796ae (diff) |
libqos/ahci: allow nondata commands for ahci_io variants
These variants try to set a data offset, even if you don't specify one.
In the cases where the offset is zero and it's a nondata command, just
ignore the instruction.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1452282920-21550-7-git-send-email-jsnow@redhat.com
Diffstat (limited to 'tests/libqos')
-rw-r--r-- | tests/libqos/ahci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c index 6536408a7d..a9a745eef5 100644 --- a/tests/libqos/ahci.c +++ b/tests/libqos/ahci.c @@ -842,6 +842,9 @@ void ahci_command_set_offset(AHCICommand *cmd, uint64_t lba_sect) if (cmd->props->atapi) { ahci_atapi_command_set_offset(cmd, lba_sect); return; + } else if (!cmd->props->data && !lba_sect) { + /* Not meaningful, ignore. */ + return; } else if (cmd->props->lba28) { g_assert_cmphex(lba_sect, <=, 0xFFFFFFF); } else if (cmd->props->lba48 || cmd->props->ncq) { |