From patchwork Tue May 22 23:26:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Verkamp X-Patchwork-Id: 160902 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 6C84BB6FA5 for ; Wed, 23 May 2012 19:07:13 +1000 (EST) Received: from localhost ([::1]:59490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX73K-00074c-KI for incoming@patchwork.ozlabs.org; Wed, 23 May 2012 04:36:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX544-0000WG-Gf for qemu-devel@nongnu.org; Wed, 23 May 2012 02:29:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX542-0000Ps-Lj for qemu-devel@nongnu.org; Wed, 23 May 2012 02:28:56 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:64824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX542-0000Ow-Fi for qemu-devel@nongnu.org; Wed, 23 May 2012 02:28:54 -0400 Received: by pbbro12 with SMTP id ro12so11303227pbb.4 for ; Tue, 22 May 2012 23:28:51 -0700 (PDT) Received: by 10.68.191.68 with SMTP id gw4mr6699539pbc.135.1337754531114; Tue, 22 May 2012 23:28:51 -0700 (PDT) Received: from hickory.ph.cox.net (ip70-176-37-144.ph.ph.cox.net. [70.176.37.144]) by mx.google.com with ESMTPS id iw4sm813019pbc.7.2012.05.22.23.28.49 (version=SSLv3 cipher=AES128-SHA); Tue, 22 May 2012 23:28:50 -0700 (PDT) From: Daniel Verkamp To: qemu-devel@nongnu.org Date: Tue, 22 May 2012 16:26:42 -0700 Message-Id: <1337729202-26850-1-git-send-email-daniel@drv.nu> X-Mailer: git-send-email 1.7.8.6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 X-Mailman-Approved-At: Wed, 23 May 2012 04:35:52 -0400 Cc: Kevin Wolf , Stefan Weil , Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Daniel Verkamp Subject: [Qemu-devel] [PATCH] 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 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 --- 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; }