From patchwork Mon Oct 5 16:01:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 526398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3E02A140273 for ; Tue, 6 Oct 2015 03:04:01 +1100 (AEDT) Received: from localhost ([::1]:46438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj8F5-0004YY-Ds for incoming@patchwork.ozlabs.org; Mon, 05 Oct 2015 12:03:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj8DC-0002YT-Nr for qemu-devel@nongnu.org; Mon, 05 Oct 2015 12:02:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj8D8-0002ap-S2 for qemu-devel@nongnu.org; Mon, 05 Oct 2015 12:02:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj8D8-0002ad-NQ for qemu-devel@nongnu.org; Mon, 05 Oct 2015 12:01:58 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 0DBC52BCD9D; Mon, 5 Oct 2015 16:01:58 +0000 (UTC) Received: from scv.usersys.redhat.com (dhcp-17-163.bos.redhat.com [10.18.17.163]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t95G1tfi020715; Mon, 5 Oct 2015 12:01:57 -0400 From: John Snow To: qemu-devel@nongnu.org Date: Mon, 5 Oct 2015 12:01:54 -0400 Message-Id: <1444060914-17069-4-git-send-email-jsnow@redhat.com> In-Reply-To: <1444060914-17069-1-git-send-email-jsnow@redhat.com> References: <1444060914-17069-1-git-send-email-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, jsnow@redhat.com Subject: [Qemu-devel] [PULL 3/3] qtest/ide-test: ppc64be correction for ATAPI tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 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); }