mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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
This commit is contained in:
parent
b1b66c3b5e
commit
b682d3a7cf
2 changed files with 5 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue