aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/ahci.h
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2014-10-01 18:55:51 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2014-11-03 09:48:41 +0000
commit54a7f8f38ddf4711ee8bf773b5066337b045a343 (patch)
tree73f759d51ba0ee79773cf79795019bb1bd90265d /hw/ide/ahci.h
parent659142ecf71a0da240ab0ff7cf929ee25c32b9bc (diff)
downloadqemu-54a7f8f38ddf4711ee8bf773b5066337b045a343.zip
qemu-54a7f8f38ddf4711ee8bf773b5066337b045a343.tar.gz
qemu-54a7f8f38ddf4711ee8bf773b5066337b045a343.tar.bz2
ahci: Fix SDB FIS Construction
The SDB FIS creation was mangled; We were writing the error byte to byte 0, and omitting the SDB FIS magic byte. Though the SDB packet layout states that: byte 0: Must be 0xA1 to indicate SDB FIS. byte 1: Port multiplier select & other flags byte 2: status byte. byte 3: error byte. This patch adds an SDB FIS structure with human-readable names, and ensures that we are filling the structure appropriately. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1412204151-18117-7-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/ide/ahci.h')
-rw-r--r--hw/ide/ahci.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
index e8ea34a..b123237 100644
--- a/hw/ide/ahci.h
+++ b/hw/ide/ahci.h
@@ -327,6 +327,14 @@ typedef struct NCQFrame {
uint8_t reserved10;
} QEMU_PACKED NCQFrame;
+typedef struct SDBFIS {
+ uint8_t type;
+ uint8_t flags;
+ uint8_t status;
+ uint8_t error;
+ uint32_t payload;
+} QEMU_PACKED SDBFIS;
+
void ahci_init(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports);
void ahci_uninit(AHCIState *s);