diff options
author | John Snow <jsnow@redhat.com> | 2015-10-05 12:00:56 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2015-10-05 12:00:56 -0400 |
commit | ec6b69ca0305ab3a3e0461aecb6f190c59a765df (patch) | |
tree | e65b218310ead710da62984b4b2c942b45f82e11 /tests/ide-test.c | |
parent | aee50319873da4ed1c1d6901260c37d6236c74b5 (diff) | |
download | qemu-ec6b69ca0305ab3a3e0461aecb6f190c59a765df.zip qemu-ec6b69ca0305ab3a3e0461aecb6f190c59a765df.tar.gz qemu-ec6b69ca0305ab3a3e0461aecb6f190c59a765df.tar.bz2 |
qtest/ide-test: ppc64be correction for ATAPI tests
the 16bit ide data register is LE by definition.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1443461938-30039-1-git-send-email-jsnow@redhat.com
Diffstat (limited to 'tests/ide-test.c')
-rw-r--r-- | tests/ide-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ide-test.c b/tests/ide-test.c index 5594738..b6e9e1a 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -633,7 +633,7 @@ static void send_scsi_cdb_read10(uint64_t lba, int nblocks) /* Send Packet */ for (i = 0; i < sizeof(Read10CDB)/2; i++) { - outw(IDE_BASE + reg_data, ((uint16_t *)&pkt)[i]); + outw(IDE_BASE + reg_data, cpu_to_le16(((uint16_t *)&pkt)[i])); } } @@ -733,7 +733,7 @@ static void cdrom_pio_impl(int nblocks) size_t offset = i * (limit / 2); size_t rem = (rxsize / 2) - offset; for (j = 0; j < MIN((limit / 2), rem); j++) { - rx[offset + j] = inw(IDE_BASE + reg_data); + rx[offset + j] = le16_to_cpu(inw(IDE_BASE + reg_data)); } ide_wait_intr(IDE_PRIMARY_IRQ); } |