]> git.proxmox.com Git - mirror_qemu.git/commit
libqos/ahci: Add cmd response sanity check helpers
authorJohn Snow <jsnow@redhat.com>
Thu, 5 Feb 2015 17:41:19 +0000 (12:41 -0500)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 16 Feb 2015 15:07:17 +0000 (15:07 +0000)
commitd1ef883894f0661f9994bc937ba09077a32a8bee
tree0d5f6b2b8b837aa745263617fd29297c99b31907
parent89a46723668a35db3eac5cb59b32ba67948dee0d
libqos/ahci: Add cmd response sanity check helpers

This patch adds a few helpers to help sanity-check the response of the
AHCI device after a command.

ahci_d2h_check_sanity inspects the D2H Register FIS,
ahci_pio_check_sanity inspects the PIO Setup FIS, and
ahci_cmd_check_sanity inspects the command header.

To support the PIO sanity check, a new structure is added for the
PIO Setup FIS type. Existing FIS types (H2D and D2H) have had their
members renamed slightly to condense reserved members into fewer
fields; and LBA fields are now represented by arrays of 8 byte chunks
instead of independent variables.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1423158090-25580-9-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/ahci-test.c
tests/libqos/ahci.c
tests/libqos/ahci.h