From 3d937150dce20cb95cbaae99b6fd48dca4261f32 Mon Sep 17 00:00:00 2001 From: John Snow Date: Mon, 5 Oct 2015 12:00:55 -0400 Subject: [PATCH 1/3] qtest/ahci: fix redundant assertion Fixes https://bugs.launchpad.net/qemu/+bug/1497711 (!ncq || (ncq && lba48)) is the same as (!ncq || lba48). The intention is simply: "If a command is NCQ, it must also be LBA48." Signed-off-by: John Snow Message-id: 1442868929-17777-1-git-send-email-jsnow@redhat.com --- tests/libqos/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c index cf66b3e32c..adb2665c6d 100644 --- a/tests/libqos/ahci.c +++ b/tests/libqos/ahci.c @@ -742,7 +742,7 @@ AHCICommand *ahci_command_create(uint8_t command_name) g_assert(!(props->lba28 && props->lba48)); g_assert(!(props->read && props->write)); g_assert(!props->size || props->data); - g_assert(!props->ncq || (props->ncq && props->lba48)); + g_assert(!props->ncq || props->lba48); /* Defaults and book-keeping */ cmd->props = props; From aee50319873da4ed1c1d6901260c37d6236c74b5 Mon Sep 17 00:00:00 2001 From: John Snow Date: Mon, 5 Oct 2015 12:00:56 -0400 Subject: [PATCH 2/3] MAINTAINERS: Small IDE/FDC touchup libqos/ahci and tests/fdc-test are under my purview also, include them in the appropriate stanzas. Signed-off-by: John Snow Message-id: 1443117055-29240-1-git-send-email-jsnow@redhat.com --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e3e34fb4b1..7603ea2d44 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -667,6 +667,7 @@ F: hw/block/cdrom.c F: hw/block/hd-geometry.c F: tests/ide-test.c F: tests/ahci-test.c +F: tests/libqos/ahci* T: git git://github.com/jnsnow/qemu.git ide Floppy @@ -675,6 +676,7 @@ L: qemu-block@nongnu.org S: Supported F: hw/block/fdc.c F: include/hw/block/fdc.h +F: tests/fdc-test.c T: git git://github.com/jnsnow/qemu.git ide OMAP From ec6b69ca0305ab3a3e0461aecb6f190c59a765df Mon Sep 17 00:00:00 2001 From: John Snow Date: Mon, 5 Oct 2015 12:00:56 -0400 Subject: [PATCH 3/3] qtest/ide-test: ppc64be correction for ATAPI tests the 16bit ide data register is LE by definition. Signed-off-by: John Snow Reviewed-by: Kevin Wolf Message-id: 1443461938-30039-1-git-send-email-jsnow@redhat.com --- tests/ide-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ide-test.c b/tests/ide-test.c index 559473812c..b6e9e1a232 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); }