From patchwork Wed May 30 13:37:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 161968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 97834B6FA4 for ; Wed, 30 May 2012 23:52:44 +1000 (EST) Received: from localhost ([::1]:37912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZjKJ-0007qH-Po for incoming@patchwork.ozlabs.org; Wed, 30 May 2012 09:52:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZjK7-0007oq-TX for qemu-devel@nongnu.org; Wed, 30 May 2012 09:52:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZjK1-0002K3-Em for qemu-devel@nongnu.org; Wed, 30 May 2012 09:52:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZjJf-00025p-46 for qemu-devel@nongnu.org; Wed, 30 May 2012 09:52:21 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4UDbUKv014035 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 May 2012 09:37:31 -0400 Received: from dhcp-5-188.str.redhat.com (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4UDbHgW011786; Wed, 30 May 2012 09:37:29 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Wed, 30 May 2012 15:37:16 +0200 Message-Id: <1338385036-9460-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1338385036-9460-1-git-send-email-kwolf@redhat.com> References: <1338385036-9460-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 5/5] ahci: SATA FIS is 20 bytes, not 0x20 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 From: Daniel Verkamp As in the SATA and AHCI specifications, a FIS is 5 Dwords of 4 bytes each, which comes to 20 bytes (decimal), not 0x20. Signed-off-by: Daniel Verkamp Signed-off-by: Kevin Wolf --- hw/ide/ahci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index a883a92..2d7d03d 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -462,7 +462,7 @@ static void ahci_check_cmd_bh(void *opaque) static void ahci_init_d2h(AHCIDevice *ad) { - uint8_t init_fis[0x20]; + uint8_t init_fis[20]; IDEState *ide_state = &ad->port.ifs[0]; memset(init_fis, 0, sizeof(init_fis)); @@ -619,7 +619,7 @@ static void ahci_write_fis_d2h(AHCIDevice *ad, uint8_t *cmd_fis) d2h_fis[11] = cmd_fis[11]; d2h_fis[12] = cmd_fis[12]; d2h_fis[13] = cmd_fis[13]; - for (i = 14; i < 0x20; i++) { + for (i = 14; i < 20; i++) { d2h_fis[i] = 0; }